-
-
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
8f6e1e4
commit 834d458
Showing
10 changed files
with
46 additions
and
27 deletions.
There are no files selected for viewing
Empty file.
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,8 +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) { | ||
export default async function unlockForFixtures(page: Page, password: string) { | ||
const lockpage = new LockPage(page) | ||
const wallet = await lockpage.unlock(seedPhrase, password) | ||
const wallet = await lockpage.unlock(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './importWallet'; | ||
export * from './importWallet'; | ||
export * from './unlockWallet'; |
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,11 @@ | ||
import { onboardingElements } from "../selectors"; | ||
import type { Page } from "@playwright/test"; | ||
|
||
export async function unlockWallet(page: Page, password: string) { | ||
await page.waitForLoadState('domcontentloaded'); | ||
const passwordField = page.locator(onboardingElements.passwordInput); | ||
await passwordField.fill(password); | ||
const button = await page.$('button[type="submit"].sc-ciZhAO.kaxPjU'); | ||
button?.click(); | ||
return true; | ||
} |
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,20 +1,20 @@ | ||
import { PASSWORD, SEED_PHRASE } from '../../src' | ||
// import { PASSWORD, SEED_PHRASE } from '../../src' | ||
import synpress from '../synpress' | ||
|
||
const test = synpress | ||
|
||
// test('should import wallet', async ({ keplr }) => { | ||
// try { | ||
// await keplr.setupWallet({ secretWordsOrPrivateKey: SEED_PHRASE, password: PASSWORD }) | ||
// } catch (error) { | ||
// console.error('Error:', error) | ||
// } | ||
// }) | ||
|
||
test('should create address', async ({ keplr }) => { | ||
try { | ||
await keplr.getWalletAddress() | ||
} catch (error) { | ||
console.error('Error:', error) | ||
} | ||
}) | ||
|
||
test('should import wallet', async ({ keplr }) => { | ||
try { | ||
await keplr.setupWallet({ secretWordsOrPrivateKey: SEED_PHRASE, password: PASSWORD }) | ||
} catch (error) { | ||
console.error('Error:', error) | ||
} | ||
}) |
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