fix: Flaky 2FA tests (#10283)

This commit is contained in:
Joe Au-Yeung
2023-07-20 19:40:35 +00:00
committed by GitHub
parent cd88b688f4
commit 514db3466f
+2 -1
View File
@@ -44,7 +44,8 @@ test.describe("2FA Tests", async () => {
secret: secret!,
});
await expect(page.locator(`[data-testid=two-factor-switch][data-state="checked"]`)).toBeVisible();
await page.waitForSelector(`[data-testid=two-factor-switch]`);
await expect(page.locator(`[data-testid=two-factor-switch]`).isChecked()).toBeTruthy();
return user;
});