Skip to content

Commit

Permalink
fix onboarding e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ost-ptk committed Sep 11, 2024
1 parent ed7cc89 commit 0c7ae35
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion e2e-tests/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const RECOVER_FIRST_ACCOUNT_FROM_TWELVE_WORDS = {
};

export const RECOVER_SECOND_ACCOUNT_FROM_TWELVE_WORDS = {
accountName: 'Account 1',
accountName: 'Account 2',
publicKey:
'02022cafccfb61ffc4e4221e4d2c38eec6035d579d04c1396b1c2027dc0729c53589',
truncatedPublicKey: '02022...53589'
Expand Down
24 changes: 18 additions & 6 deletions e2e-tests/onboarding-flow/recover-secret-phrase-flow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ onboarding.describe('Onboarding UI: recover secret phrase flow', () => {
await page.getByText('All accounts').click();

await onboardingExpect(
page.getByText(DEFAULT_FIRST_ACCOUNT.accountName)
page
.getByText(DEFAULT_FIRST_ACCOUNT.accountName, { exact: true })
.nth(1)
).toBeVisible();
await onboardingExpect(
page.getByText(DEFAULT_FIRST_ACCOUNT.truncatedPublicKey).nth(0)
Expand Down Expand Up @@ -100,10 +102,12 @@ onboarding.describe('Onboarding UI: recover secret phrase flow', () => {
await page.getByText('All accounts').click();

await onboardingExpect(
page.getByText(DEFAULT_FIRST_ACCOUNT.accountName)
page
.getByText(DEFAULT_FIRST_ACCOUNT.accountName, { exact: true })
.nth(1)
).toBeVisible();
await onboardingExpect(
page.getByText(DEFAULT_FIRST_ACCOUNT.truncatedPublicKey).nth(0)
page.getByText(DEFAULT_FIRST_ACCOUNT.truncatedPublicKey).nth(1)
).toBeVisible();
await onboardingExpect(
page.getByText(DEFAULT_SECOND_ACCOUNT.accountName)
Expand Down Expand Up @@ -158,7 +162,11 @@ onboarding.describe('Onboarding UI: recover secret phrase flow', () => {
await page.getByText('All accounts').click();

await onboardingExpect(
page.getByText(RECOVER_FIRST_ACCOUNT_FROM_TWELVE_WORDS.accountName)
page
.getByText(RECOVER_FIRST_ACCOUNT_FROM_TWELVE_WORDS.accountName, {
exact: true
})
.nth(1)
).toBeVisible();
await onboardingExpect(
page
Expand Down Expand Up @@ -213,12 +221,16 @@ onboarding.describe('Onboarding UI: recover secret phrase flow', () => {
await page.getByText('All accounts').click();

await onboardingExpect(
page.getByText(RECOVER_FIRST_ACCOUNT_FROM_TWELVE_WORDS.accountName)
page
.getByText(RECOVER_FIRST_ACCOUNT_FROM_TWELVE_WORDS.accountName, {
exact: true
})
.nth(1)
).toBeVisible();
await onboardingExpect(
page
.getByText(RECOVER_FIRST_ACCOUNT_FROM_TWELVE_WORDS.truncatedPublicKey)
.nth(0)
.nth(1)
).toBeVisible();
await onboardingExpect(
page.getByText(RECOVER_SECOND_ACCOUNT_FROM_TWELVE_WORDS.accountName)
Expand Down

0 comments on commit 0c7ae35

Please sign in to comment.