Skip to content

date: 2026-06-12 tags: [vitest, browser-tests, ci, page-manifest] status: active graduated_to:

Adding a browser test named after a grandfathered page fails the page-manifest guard

Symptom — CI's Vitest job failed on resources/js/__tests__/page-manifest.test.ts: "expected [ 'auth/Login.vue' ] to deeply equal []" after adding tests/Browser/LoginTabOrderTest.php, even though the new test is correct.

Root cause — the guard's second assertion ("no grandfathered entry is already covered") decides coverage by name-substring: a page is "covered" when its bare name appears in any tests/Browser/*.php filename. LoginTabOrderTest contains "Login", so auth/Login.vue — still in the GRANDFATHERED set — registered as now-covered, which the guard treats as stale grandfathering and fails.

Fix — when you add a browser test whose filename contains a grandfathered page's name, remove that page from the GRANDFATHERED set in the same change (that's the guard's intent: backfilled pages graduate out). Done for auth/Login.vue. Corollary: avoid a browser-test filename that substring-matches an unrelated grandfathered page.

Guard — the page-manifest test itself (it fails loudly in CI); this learning explains the one-line fix.