Skip to content

Commit

Permalink
fix incorrect mnemonic phrase test
Browse files Browse the repository at this point in the history
  • Loading branch information
piyalbasu committed Nov 26, 2024
1 parent a0c3257 commit cfb5158
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions extension/e2e-tests/onboarding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,18 @@ test("Import wallet with wrong password", async ({ page }) => {
});

test("Incorrect mnemonic phrase", async ({ page }) => {
await page.getByText("Create Wallet").click();
await page.getByText("Create new wallet").click();
await expect(page.getByText("Create a password")).toBeVisible();

await page.locator("#new-password-input").fill("My-password123");
await page.locator("#confirm-password-input").fill("My-password123");
await page.locator("#termsOfUse-input").check({ force: true });
await page.getByText("Confirm").click();

await expect(page.getByText("Secret Recovery phrase")).toBeVisible();
await expect(page.getByTestId("MnemonicPhrase__modal")).toBeVisible();
await expectPageToHaveScreenshot({ page, screenshot: "recovery-modal.png" });

await page.getByText("Show recovery phrase").click();
await expectPageToHaveScreenshot(
{ page, screenshot: "recovery-page.png" },
{
Expand All @@ -230,9 +233,7 @@ test("Incorrect mnemonic phrase", async ({ page }) => {
}

await page.getByTestId("display-mnemonic-phrase-confirm-btn").click();
await expect(
page.getByText("The secret phrase you entered is incorrect."),
).toBeVisible();
await expect(page.getByText("Order is incorrect, try again")).toBeVisible();
await expectPageToHaveScreenshot(
{ page, screenshot: "incorrect-recovery-phrase-page.png" },
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cfb5158

Please sign in to comment.