Skip to content

Scheduling infrastructure for absolutely everyone.

fix: e2e flakes (#20630)

Anik Dhabal Babu61397e51841f
diff --git a/apps/web/playwright/hash-my-url.e2e.ts b/apps/web/playwright/hash-my-url.e2e.ts
index 35685f9acee..bb48cb87a27 100644
--- a/apps/web/playwright/hash-my-url.e2e.ts
+++ b/apps/web/playwright/hash-my-url.e2e.ts
@@ -23,6 +23,11 @@ test.describe("hash my url", () => {
// We wait until loading is finished
await page.waitForSelector('[data-testid="event-types"]');
await page.locator("ul[data-testid=event-types] > li a").first().click();
+ await expect(page.getByTestId("vertical-tab-event_setup_tab_title")).toHaveAttribute(
+ "aria-current",
+ "page"
+ ); // fix the race condition
+ await expect(page.getByTestId("vertical-tab-event_setup_tab_title")).toContainText("Event Setup"); //fix the race condition
// We wait for the page to load
await page.locator(".primary-navigation >> text=Advanced").click();
// ignore if it is already checked, and click if unchecked
diff --git a/apps/web/playwright/login.2fa.e2e.ts b/apps/web/playwright/login.2fa.e2e.ts
index d55f4530399..e9fa1214341 100644
--- a/apps/web/playwright/login.2fa.e2e.ts
+++ b/apps/web/playwright/login.2fa.e2e.ts
@@ -50,16 +50,13 @@ test.describe("2FA Tests", async () => {
secret: secret!,
});
- // FIXME: this passes even when switch is not checked, compare to test
- // below which checks for data-state="checked" and works as expected
- await page.waitForSelector(`[data-testid=two-factor-switch]`);
- await expect(page.locator(`[data-testid=two-factor-switch]`).isChecked()).toBeTruthy();
+ await expect(page.getByTestId("backup-codes-download")).toBeVisible();
return user;
});
await test.step("Logout", async () => {
- await page.goto("/auth/logout");
+ await users.logout();
});
await test.step("Login with 2FA enabled", async () => {