-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
1 parent
3cf42d9
commit 5baf24d
Showing
9 changed files
with
58 additions
and
50 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { Page } from '@playwright/test'; | ||
import { LockPage } from '../pages/LockPage/page' | ||
|
||
export default async function unlockForFixtures(page: Page, seedPhrase: string, password: string) { | ||
const lockpage = new LockPage(page) | ||
const wallet = await lockpage.unlock(seedPhrase, password) | ||
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
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,7 +1,16 @@ | ||
import test from '../synpress' | ||
const { expect } = test | ||
//const { expect } = test | ||
import { getExtensionId } from '../../src/fixtureActions' | ||
import { PASSWORD, SEED_PHRASE } from '../../src' | ||
|
||
test.only('should get address', async ({ context, keplr }) => { | ||
const extensionId = await getExtensionId(context, 'keplr') | ||
console.log('6') | ||
const page = await context.newPage() | ||
console.log('7') | ||
await keplr.setupWallet(page, { secretWordsOrPrivateKey: SEED_PHRASE, password: PASSWORD }) | ||
console.log('8') | ||
await page.goto(`chrome-extension://${extensionId}/popup.html`) | ||
await keplr.getWalletAddress(page) | ||
|
||
test.only('should get address', async ({ page, keplr }) => { | ||
console.log('page', page, keplr) | ||
expect(await keplr.getWalletAddress(page)).toBeTruthy() | ||
}) |
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,15 +1,15 @@ | ||
import { defineWalletSetup } from "@synthetixio/synpress-cache"; | ||
import { KeplrWallet } from "../../src"; | ||
import { getExtensionId, prepareExtension } from "../../src/fixtureActions"; | ||
import { getExtensionId } from "../../src/fixtureActions"; | ||
|
||
const SEED_PHRASE = 'orbit bench unit task food shock brand bracket domain regular warfare company announce wheel grape trust sphere boy doctor half guard ritual three ecology' | ||
const PASSWORD = 'Test1234' | ||
|
||
export default defineWalletSetup(PASSWORD, async (context, lockPage) => { | ||
await prepareExtension() | ||
const extensionId = await getExtensionId(context, 'keplr') | ||
const keplr = new KeplrWallet(lockPage, context, PASSWORD, extensionId) | ||
|
||
const page = await context.newPage() | ||
await page.goto(`chrome-extension://${extensionId}/register.html`) | ||
const keplr = new KeplrWallet(page, context, PASSWORD, extensionId) | ||
await keplr.setupWallet(page, { secretWordsOrPrivateKey: SEED_PHRASE, password: PASSWORD}) | ||
}) |