From e1b10b4ec55ff1ee11ca4b40acde4a35ef4fac6a Mon Sep 17 00:00:00 2001 From: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:59:08 +0530 Subject: [PATCH] fix: update email flaky test (#13727) --- apps/web/playwright/profile.e2e.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/web/playwright/profile.e2e.ts b/apps/web/playwright/profile.e2e.ts index 967c40c585..f4b61bfe01 100644 --- a/apps/web/playwright/profile.e2e.ts +++ b/apps/web/playwright/profile.e2e.ts @@ -143,8 +143,12 @@ test.describe("Update Profile", () => { const successLocator = await page.waitForSelector('[data-testId="toast-success"]'); expect(await successLocator.textContent()).toContain(email); + + // After email verification is successfull. user is sent to /event-types + await page.waitForURL("/event-types"); + await page.goto("/settings/my-account/profile"); - const emailInputUpdated = page.getByTestId("profile-form-email"); + const emailInputUpdated = await page.getByTestId("profile-form-email"); expect(await emailInputUpdated.inputValue()).toEqual(email); }); test("Can update a users email (verification disabled)", async ({ page, users, prisma, features }) => {