Skip to content

feat: Playwright e2e smoke suite guarding the a11y and island behaviors#68

Merged
seriouslysean merged 1 commit into
mainfrom
feat/e2e-smoke
Jul 14, 2026
Merged

feat: Playwright e2e smoke suite guarding the a11y and island behaviors#68
seriouslysean merged 1 commit into
mainfrom
feat/e2e-smoke

Conversation

@seriouslysean

Copy link
Copy Markdown
Owner

What

Adds the deferred browser-test regression net from the audit follow-ups: a 9-test Playwright (chromium-only) smoke suite covering the six a11y/island behaviors that previously had no automated coverage, wired into the required ci check so it also gates the weekly data auto-merge.

Tests (e2e/, 4 specs, 9 tests)

  • catalog-filter — filter hides cards + #catalog-status (role=status) announces count/no-match; Enter writes ?q= and a fresh load restores it; lazy /variant-icons.json fetch + card face-swap, reverting to data-default-name
  • tooltip:focus-within reveals the popup on a non-cycling slot; grid a11y contract (visually-hidden summary, no role override, focusable triggers)
  • variant-cycle — fake clock (page.clock) proves the 1500ms cycle advances, pauses on hover, and never runs under prefers-reduced-motion
  • recipe-actions — copy-link (clipboard permission + fake clock: Copied/announced/disabled → revert); view-transition journey proving scripts rebind on astro:page-load and the pager navigates (URL shape only — slugs are data-dependent)

All assertions read expected values from the page's own data attributes / the manifest, so weekly vanilla-data bumps can't break them.

Infra

  • playwright.config.tsastro preview webServer on 4321 (build-first), retries/workers/HTML report in CI only
  • vitest.config.ts — scopes vitest to tests/** so it never collects e2e/*.spec.ts. Local note: configless vitest was also collecting 221 duplicate suites from stale .claude/worktrees/ copies (the "2825 tests" figure); the real suite is 32 files / 408 tests, all still collected — CI counts are unchanged
  • CI: after Build — resolve Playwright version → cache ~/.cache/ms-playwright → install chromium → npm run test:e2e → report artifact on failure (7d). New actions SHA-pinned. ~50–70s on cache hit
  • Type-check coverage via tsconfig.node.json include; oxlint/oxfmt/git ignore playwright-report/test-results
  • Docs: AGENTS.md + verify skill gain npm run test:e2e with the build-first gotcha

Verification

  • format:check / type-check / lint / npm test (32 files, 408) / build — all green
  • npm run test:e2e — 9/9; --repeat-each=3 — 27/27, zero flakes

Out of scope

Visual regression, cross-browser matrix, axe-core, data-dependent assertions.

https://claude.ai/code/session_013ga8yb2vDELdU9x9zZPDtA

Adds 9 chromium smoke tests (e2e/) covering the six behaviors with no
regression net: catalog filter + aria-live announcements, URL state
restore, lazy variant face-swap, keyboard tooltips, variant cycling
pause + prefers-reduced-motion, copy-link, and script rebinding across
view transitions. Tests are data-driven (names/values read from the
page and variant-icons.json) so weekly data bumps can't break them.

Runs inside the required ci check after Build (cached chromium install,
report artifact on failure), so it also gates the weekly data auto-merge.
vitest.config.ts scopes vitest to tests/ so it never collects e2e specs.

Claude-Session: https://claude.ai/code/session_013ga8yb2vDELdU9x9zZPDtA
@seriouslysean
seriouslysean marked this pull request as ready for review July 14, 2026 18:24
@seriouslysean
seriouslysean merged commit ed5b453 into main Jul 14, 2026
1 check passed
@seriouslysean
seriouslysean deleted the feat/e2e-smoke branch July 14, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant