Poll for storage being deleted in OIDC test (#33620)

* Poll for storage being deleted in OIDC test

This was flaking due to logout being async and sometimes not finishing
by the time the dialog appeared.

* Add missing screenshot
This commit is contained in:
David Baker
2026-05-27 10:41:16 +01:00
committed by GitHub
parent 517b0d0edb
commit 1f305f1e10
2 changed files with 2 additions and 3 deletions
@@ -101,10 +101,9 @@ test.describe("OIDC Native", { tag: ["@no-firefox", "@no-webkit"] }, () => {
await expect(
page.getByText("For security, this session has been removed. Please sign in again."),
).toBeVisible();
//await expect(page).toMatchScreenshot("token-expired.png", { includeDialogBackground: true });
await expect(page).toMatchScreenshot("token-expired.png", { includeDialogBackground: true });
const localStorageKeys = await page.evaluate(() => Object.keys(localStorage));
expect(localStorageKeys).toHaveLength(0);
await expect.poll(() => page.evaluate(() => Object.keys(localStorage))).toHaveLength(0);
},
);
Binary file not shown.

After

Width:  |  Height:  |  Size: 975 KiB