From 4c854e00ca1a4fabd7d71b01ad98bfe97a5ba448 Mon Sep 17 00:00:00 2001 From: zomars Date: Mon, 29 May 2023 20:12:17 -0700 Subject: [PATCH] Fix tests flakyness --- apps/web/playwright/auth/delete-account.e2e.ts | 1 + apps/web/playwright/auth/forgot-password.e2e.ts | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/web/playwright/auth/delete-account.e2e.ts b/apps/web/playwright/auth/delete-account.e2e.ts index 73df266ac7..57d2b23a7f 100644 --- a/apps/web/playwright/auth/delete-account.e2e.ts +++ b/apps/web/playwright/auth/delete-account.e2e.ts @@ -13,6 +13,7 @@ test("Can delete user account", async ({ page, users }) => { await page.waitForSelector("[data-testid=dashboard-shell]"); await page.goto(`/settings/my-account/profile`); + await page.waitForLoadState("networkidle"); await page.click("[data-testid=delete-account]"); if (!user.username) throw Error(`Test user doesn't have a username`); diff --git a/apps/web/playwright/auth/forgot-password.e2e.ts b/apps/web/playwright/auth/forgot-password.e2e.ts index ead9e4e9da..e8d3eb224f 100644 --- a/apps/web/playwright/auth/forgot-password.e2e.ts +++ b/apps/web/playwright/auth/forgot-password.e2e.ts @@ -29,9 +29,7 @@ test("Can reset forgotten password", async ({ page, users }) => { // Click text=Submit await page.click('button[type="submit"]'); - await page.waitForSelector("text=Password updated", { - timeout: 3000, - }); + await page.waitForSelector("text=Password updated"); await expect(page.locator(`text=Password updated`)).toBeVisible(); // Click button:has-text("Login")