diff --git a/tests/e2e/accessibility.spec.ts b/tests/e2e/accessibility.spec.ts index 9e553ec3..f2aca7e9 100644 --- a/tests/e2e/accessibility.spec.ts +++ b/tests/e2e/accessibility.spec.ts @@ -1,6 +1,7 @@ import AxeBuilder from "@axe-core/playwright"; import { expect, test, type Page } from "../support/browser/strict-browser-test.ts"; import { ROUTE_REGISTRY } from "../../src/features/installed-feature-contracts.ts"; +import type { RouteDefinition } from "../../src/contracts/routes.ts"; import { KO_MESSAGES } from "../../src/presentation/i18n/catalog.ts"; const WCAG_TAGS = ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"]; @@ -18,7 +19,10 @@ async function blockingViolations(page: Page) { // axe waits for the route's own h1. A public route's h1 is its catalog title. // A protected route is scanned after the demo sign-in, never on the sign-in // prompt; the feature's own spec pins its exact headings and states. -for (const definition of Object.values(ROUTE_REGISTRY)) { +// Widened: without an installed feature every route is public, and the +// `session-required` branch must still typecheck (sample removal). +const ROUTES: readonly RouteDefinition[] = Object.values(ROUTE_REGISTRY); +for (const definition of ROUTES) { const route = definition.path === "*" ? "/not-found"