Fix some flaky playwright tests (#33085)

* Tweak flaky test reporter to identify setup failures

* Fix some flaky playwright tests

* Iterate
This commit is contained in:
Michael Telatynski
2026-04-09 14:34:48 +00:00
committed by GitHub
parent a5e09ebb53
commit b6b0b0009c
4 changed files with 26 additions and 11 deletions
@@ -43,11 +43,7 @@ test.describe("Key storage out of sync toast", () => {
});
test("should prompt for recovery key if 'enter recovery key' pressed", { tag: "@screenshot" }, async ({ page }) => {
// We need to wait for there to be two toasts as the wait below won't work in isolation:
// playwright only evaluates the 'first()' call initially, not subsequent times it checks, so
// it would always be checking the same toast, even if another one is now the first.
await expect(page.getByRole("alert")).toHaveCount(2);
await expect(page.getByRole("alert").first()).toMatchScreenshot(
await expect(page.getByRole("alert").filter({ hasText: "Your key storage is out of sync." })).toMatchScreenshot(
"key-storage-out-of-sync-toast.png",
screenshotOptions,
);