-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
172 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
declare module '@synthetixio/synpress-utils' | ||
declare module '@synthetixio/synpress-utils' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,49 @@ | ||
import { downloadFile, ensureCacheDirExists, unzipArchive } from '.' | ||
|
||
interface ExtensionConfig { | ||
name: string; | ||
version: string; | ||
downloadUrl: string; | ||
name: string | ||
version: string | ||
downloadUrl: string | ||
} | ||
|
||
async function getExtensionConfig(name: string): Promise<ExtensionConfig> { | ||
const config = { | ||
"extensions": [ | ||
extensions: [ | ||
{ | ||
"name": "MetaMask", | ||
"version": "11.9.1", | ||
"downloadUrl": "https://github.com/MetaMask/metamask-extension/releases/download/v11.9.1/metamask-chrome-11.9.1.zip" | ||
name: 'MetaMask', | ||
version: '11.9.1', | ||
downloadUrl: | ||
'https://github.com/MetaMask/metamask-extension/releases/download/v11.9.1/metamask-chrome-11.9.1.zip' | ||
}, | ||
{ | ||
"name": "Keplr", | ||
"version": "0.12.102", | ||
"downloadUrl": "https://github.com/chainapsis/keplr-wallet/releases/download/v0.12.102/keplr-extension-manifest-v2-v0.12.102.zip" | ||
name: 'Keplr', | ||
version: '0.12.102', | ||
downloadUrl: | ||
'https://github.com/chainapsis/keplr-wallet/releases/download/v0.12.102/keplr-extension-manifest-v2-v0.12.102.zip' | ||
} | ||
] | ||
} | ||
|
||
const extension = config.extensions.find((ext: { name: string }) => ext.name === name); | ||
const extension = config.extensions.find((ext: { name: string }) => ext.name === name) | ||
if (!extension) { | ||
throw new Error(`Extension configuration not found for ${name}`); | ||
throw new Error(`Extension configuration not found for ${name}`) | ||
} | ||
return extension; | ||
return extension | ||
} | ||
|
||
export async function prepareExtension(extensionName: string) { | ||
const cacheDirPath = ensureCacheDirExists(); | ||
const extensionConfig = await getExtensionConfig(extensionName); // Get config | ||
const cacheDirPath = ensureCacheDirExists() | ||
const extensionConfig = await getExtensionConfig(extensionName) // Get config | ||
|
||
const downloadResult = await downloadFile({ | ||
url: extensionConfig.downloadUrl, | ||
outputDir: cacheDirPath, | ||
fileName: `${extensionConfig.name.toLowerCase()}-chrome-${extensionConfig.version}.zip` | ||
}); | ||
}) | ||
|
||
const unzipResult = await unzipArchive({ | ||
archivePath: downloadResult.filePath | ||
}); | ||
}) | ||
|
||
return unzipResult.outputPath; | ||
} | ||
return unzipResult.outputPath | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { default as installSynpress } from './installSynpress' | ||
export { default as installSynpress } from './installSynpress' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ import './commands' | |
|
||
Cypress.on('uncaught:exception', () => { | ||
return false | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './getExtensionId' | ||
export * from './getExtensionId' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import type { Page } from '@playwright/test'; | ||
import type { Page } from '@playwright/test' | ||
import { LockPage } from '../pages/LockPage/page' | ||
|
||
export default async function unlockForFixtures(page: Page, password: string) { | ||
const lockpage = new LockPage(page) | ||
const wallet = await lockpage.unlock(password) | ||
return wallet; | ||
} | ||
return wallet | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
wallets/keplr/src/pages/HomePage/actions/addNewTokensFound.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
wallets/keplr/src/pages/HomePage/actions/getWalletAddress.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import type { Page } from '@playwright/test'; | ||
import { homePageElements } from '../selectors'; | ||
import type { Page } from '@playwright/test' | ||
import { homePageElements } from '../selectors' | ||
|
||
export const getWalletAddress = async (page: Page, wallet: string) => { | ||
await page.waitForLoadState('domcontentloaded'); | ||
await page.getByText(homePageElements.copyAddress).click(); | ||
const chain = await page.waitForSelector(homePageElements.walletSelectors(wallet)); | ||
await chain.click(); | ||
await page.waitForLoadState('domcontentloaded') | ||
await page.getByText(homePageElements.copyAddress).click() | ||
const chain = await page.waitForSelector(homePageElements.walletSelectors(wallet)) | ||
await chain.click() | ||
|
||
return 'no access to clipboard!' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from './addNewTokensFound'; | ||
export * from './getWalletAddress'; | ||
export * from './getTokenAmount'; | ||
export * from './addNewTokensFound' | ||
export * from './getWalletAddress' | ||
export * from './getTokenAmount' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.