test(e2e): lift expect timeout to 10s and CI retries to 2 for loaded-runner headroom

A rotating single e2e test failed each CI run (wizard step transition,
list-refetch card provenance, disclosure toggle) while 211 passed — DOM-
settle-gated assertions sampling a mid-transition frame on a starved shared
runner. Raise the global expect timeout 5s→10s (suite-wide settle headroom)
and CI retries 1→2 (absorb the transient without masking a real break, which
fails all attempts). Also scroll the provenance card into view before reading
its attribute, since the mobile timeline can render it off-viewport.
This commit is contained in:
Marc-André Bombeck committed 2026-07-08 23:04:22 +02:00
1 parent e48f9859c8
commit 50e630bf2d
2 files changed
+15 -4

No files matched your search

+6 -2
View File
@@ -368,10 +368,14 @@ test.describe("document vault — AI assist + content search", () => {
await page.keyboard.press("Escape");
const marker = page
.locator('[data-slot="document-card"]', { hasText: "Radiology note" })
.locator('[data-slot="document-searchable"]');
.locator('[data-slot="document-searchable"]')
.first();
// The card marker appears after the list query invalidates and refetches
// the new provenance; on a loaded runner that round-trip can outlast the
// default 5s expect timeout, so wait explicitly for it to resolve.
// default 5s expect timeout, so wait explicitly for it to resolve. Scroll
// it into view first — the mobile timeline can render the card outside the
// viewport, where the attribute read intermittently misses it.
await marker.scrollIntoViewIfNeeded();
await expect(marker).toHaveAttribute("data-source", "ai-read", {
timeout: 20_000,
});
+9 -2
View File
@@ -19,10 +19,17 @@ export default defineConfig({
testIgnore: ["setup/**"],
globalSetup: "./e2e/setup/global-setup.ts",
timeout: 30_000,
expect: { timeout: 5_000 },
expect: { timeout: 10_000 },
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
// Two retries on CI: under a loaded shared runner, DOM-settle-gated
// assertions (wizard step transitions, list refetch → card provenance,
// disclosure toggles) intermittently sample a mid-transition frame. A
// rotating single test failed each run while 211 passed; a second retry
// absorbs that transient contention without masking a real failure (a true
// break fails all three attempts). The default expect timeout is also
// lifted from 5s → 10s for the same settle headroom.
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 2 : undefined,
reporter: process.env.CI
? [["github"], ["html", { open: "never" }]]