From cea0f1cfece4aa507641f7ef9917423c787129cd Mon Sep 17 00:00:00 2001 From: bchanot Date: Mon, 2 Nov 2026 19:47:12 +0100 Subject: [PATCH] test(app): phone navigation waits for the drawer to close before typing Root cause of the intermittent P1 failure at 375 px: the search was filled while the drawer's modal kept the page inert. Reproduced 1/16, then 32/32 with the wait; full shell suite 108 passed, 6 skipped by design. --- .../tasks/contracts/2026-11-02-v1-2-5-admin-catalogue.md | 7 ++++--- apps/app/e2e/shell/admin.spec.ts | 5 +++++ apps/app/e2e/shell/catalogue.spec.ts | 5 +++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.claude/tasks/contracts/2026-11-02-v1-2-5-admin-catalogue.md b/.claude/tasks/contracts/2026-11-02-v1-2-5-admin-catalogue.md index 19f541ef..58aa4ff6 100644 --- a/.claude/tasks/contracts/2026-11-02-v1-2-5-admin-catalogue.md +++ b/.claude/tasks/contracts/2026-11-02-v1-2-5-admin-catalogue.md @@ -85,7 +85,8 @@ the equine working copy content work (V1-2.8), any DEV operation (§16.11), reco install and upgrade from M6, pgTAP 1941 pass, types match (after the fixes: fresh install, 1941 pass, types match); C11 `pnpm check:all` all checks passed on 4f6c0ba code (= 3d2b5a5 code), `pnpm e2e:shell` 108 passed / 6 skipped (slice J run, and again after the fixes), unit core-wasm 66, supabase 148, app 653. -- Tracked, not fixed: the P1 catalogue journey on `chromium-375` failed once in three full `e2e:shell` runs - (search typed, 8 cards instead of 1, FR and EN in the same run); passed alone twice and in the next full - run; cause not found, page snapshot overwritten. pgTAP 014 (« nine species ») fails on a stack where the +- P1 catalogue journey on `chromium-375` (search typed, 8 cards instead of 1): failed in two of four full + `e2e:shell` runs, reproduced once in 16 repetitions. Cause: the test filled the search box while the mobile + drawer's modal was still closing, page inert. Fixed in the test: both navigation helpers wait for the drawer + to be gone (32 of 32 repetitions, then the full suite green). A person cannot type in that window either. pgTAP 014 (« nine species ») fails on a stack where the shell suite already ran (test species left behind): run `test-db` before `e2e:shell` on one stack. diff --git a/apps/app/e2e/shell/admin.spec.ts b/apps/app/e2e/shell/admin.spec.ts index acd9a528..6b73a581 100644 --- a/apps/app/e2e/shell/admin.spec.ts +++ b/apps/app/e2e/shell/admin.spec.ts @@ -56,6 +56,11 @@ async function navigate(page: Page, dict: Dict, info: TestInfo, key: string) { .getByRole('navigation') .getByRole('link', { name: dict[key] }) .click() + // The drawer's modal keeps the page inert until its exit animation ends: + // typed text would be lost (a fill on the search box went nowhere). + await expect( + page.getByRole('dialog', { name: dict['shell.nav_label'] }), + ).toHaveCount(0) } else { await page .getByRole('navigation', { name: dict['shell.nav_label'] }) diff --git a/apps/app/e2e/shell/catalogue.spec.ts b/apps/app/e2e/shell/catalogue.spec.ts index 13013890..2db632c4 100644 --- a/apps/app/e2e/shell/catalogue.spec.ts +++ b/apps/app/e2e/shell/catalogue.spec.ts @@ -46,6 +46,11 @@ async function navigate(page: Page, dict: Dict, info: TestInfo, key: string) { .getByRole('navigation') .getByRole('link', { name: dict[key] }) .click() + // The drawer's modal keeps the page inert until its exit animation ends: + // typed text would be lost (a fill on the search box went nowhere). + await expect( + page.getByRole('dialog', { name: dict['shell.nav_label'] }), + ).toHaveCount(0) } else { await page .getByRole('navigation', { name: dict['shell.nav_label'] })