Fix tests flakyness

This commit is contained in:
zomars 2023-05-29 20:12:17 -07:00
parent 67bb4cf5ca
commit 4c854e00ca
2 changed files with 2 additions and 3 deletions

View File

@ -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`);

View File

@ -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")