Skip to content

Commit

Permalink
update(test): wait for backup phrase page to load (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm authored Dec 13, 2024
1 parent 08d2984 commit 9a3c62e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions playwright/PageObjects/SaveRecoverySeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@ export class SaveRecoverySeedPage extends MainPage {
// Return the saved file path for further validation
return savedFilePath;
}

async validatePageIsLoaded() {
await this.titleRecoveryPage.waitFor({ state: "attached" });
}
}
4 changes: 4 additions & 0 deletions playwright/fixtures/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export const test = base.extend<MyFixtures>({
await loginPinPage.enterDefaultPin();

// Click on I Saved It
await saveRecoverySeed.validatePageIsLoaded();
await saveRecoverySeed.clickOnSavedIt();

await chatsMainPage.addSomeone.waitFor({ state: "attached" });
Expand Down Expand Up @@ -144,6 +145,7 @@ export const test = base.extend<MyFixtures>({
await loginPinPage.enterDefaultPin();

// Click on I Saved It
await saveRecoverySeed.validatePageIsLoaded();
await saveRecoverySeed.clickOnSavedIt();

// Pass the context, browser, and page to the test
Expand Down Expand Up @@ -189,6 +191,7 @@ export const test = base.extend<MyFixtures>({
await loginPinPage.enterDefaultPin();

// Click on I Saved It
await saveRecoverySeed.validatePageIsLoaded();
await saveRecoverySeed.clickOnSavedIt();

// Pass the context, browser, and page to the test
Expand Down Expand Up @@ -243,6 +246,7 @@ export const test = base.extend<MyFixtures>({
await loginPinPage.enterDefaultPin();

// Click on I Saved It
await saveRecoverySeed.validatePageIsLoaded();
await saveRecoverySeed.clickOnSavedIt();

// Pass the context, browser, and page to the test
Expand Down
1 change: 1 addition & 0 deletions playwright/specs/01-pin-input.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test.describe("Create Account and Login Tests", () => {
});

await test.step("Validate Save Recovery Seed Page, click on I Saved It and wait for Chat page to load", async () => {
await saveRecoverySeed.validatePageIsLoaded();
await expect(saveRecoverySeed.titleRecoveryPage).toHaveText(
"Backup your seed!",
);
Expand Down

0 comments on commit 9a3c62e

Please sign in to comment.