fix: e2e flakes (#20630)
* fix * Update managed-event-types.e2e.ts * fix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user