test(a11y): keep the route scan typechecking after sample removal (08-05)

With the sample removed every route is public, so comparing access with
session-required no longer typechecked and test:sample-removal failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
donghyeon-ka
2026-09-27 13:18:54 +09:00
co-authored by Claude Opus 5.5
parent 67117cc5a5
commit 02b90b2244
+5 -1
View File
@@ -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"