From cc7977131a4f991578f29d83eec17a242a858fca Mon Sep 17 00:00:00 2001 From: cesnimda Date: Tue, 20 Oct 2026 09:45:39 +0200 Subject: [PATCH] test(e2e): distinguish notification caption from live count --- .../2026-10-20-notification-caption-fixture.md | 9 +++++++++ job-tracker-ui/e2e/shell-readiness.spec.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 docs/infrastructure/2026-10-20-notification-caption-fixture.md diff --git a/docs/infrastructure/2026-10-20-notification-caption-fixture.md b/docs/infrastructure/2026-10-20-notification-caption-fixture.md new file mode 100644 index 0000000..5f77f3c --- /dev/null +++ b/docs/infrastructure/2026-10-20-notification-caption-fixture.md @@ -0,0 +1,9 @@ +# Notification caption fixture — 20 October 2026 + +The full Linux diagnostic found four ordinary shell failures, each repeated by the existing CI retry: the loose `getByText(t.notificationsUnread)` query matched both the visible localized Unread caption and the shell's unread-count live announcement. Both are intentional accessibility/UI content. The fixture intended to assert the exact caption. + +The locator now uses `{ exact: true }`. It still requires the visible translated caption, retains the live status announcement and preserves every notification mark-read/dismiss assertion and axe scan. No product behavior changes. Browser inventory stays 331. + +All 20 existing shell-readiness cases pass without skips/flaky/retries at 07:42:01–07:44:53 UTC, across English/Bokmål and light/dark, with browser TypeScript passing. Whitespace checks pass. Full Linux acceptance remains required for the new main candidate; this focused result is not deployment success. + +Run 828 completed its 331-case browser lane with 274 passing and 57 failing cases. All failed cases are accounted for by the five investigated causes: 35 shared-login 429, 15 Python-wrapper absence, four caption locator collisions, two stale route expectations and one keyboard-scroll axe violation. Original retries and failure artifacts remain retained. Subsequent corrected-run results must determine whether these repairs are sufficient. diff --git a/job-tracker-ui/e2e/shell-readiness.spec.ts b/job-tracker-ui/e2e/shell-readiness.spec.ts index b8f67f1..d710f1a 100644 --- a/job-tracker-ui/e2e/shell-readiness.spec.ts +++ b/job-tracker-ui/e2e/shell-readiness.spec.ts @@ -268,7 +268,7 @@ for (const mode of ["light", "dark"] as const) for (const language of ["en", "nb ? route.fulfill({ status: 204, body: "" }) : route.continue()); await page.getByRole("button", { name: t.notifications, exact: true }).click(); await expect(page.getByText("CV export failed")).toBeVisible(); - await expect(page.getByText(t.notificationsUnread)).toBeVisible(); + await expect(page.getByText(t.notificationsUnread, { exact: true })).toBeVisible(); await capture(page, info, `utility-notifications-${suffix}`); await scan(page, info, `utility-notifications-${suffix}`, ".MuiPopover-paper"); await page.getByRole("button", { name: t.notificationsMarkRead }).click();