chore(test-infra): TEST-INFRA-001 — Playwright + visual regression + real-backend e2e foundation #21
Reference in New Issue
Block a user
Delete Branch "chore/test-infra-001"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements RFC-WS-FRONTEND-PRIMEVUE Amendment A-1 (commit
0d4afcd).What this delivers
mountWithProvidershelper with Vuetify+Pinia+TanStack+Router providers viaplaywright/index.tsbeforeMounthook. Vuetify provider line is temporary, swaps to PrimeVue in F3 (~2-hour mechanical change documented in ARCH-TESTING.md §7).resources/Crewli - Artist Timetable Management/crewli-timetable.html, 5 composite baselines captured for Artist Management surfaces, 9 documentedtest.skip()for prototype limitationsphp artisan serve --port=8001), Sanctum cookie-auth helper (POST/api/v1/auth/login, baseURL must belocalhost:8001not127.0.0.1:8001perSetAuthCookie.phpsemantics), 409 conflict contract test (TEST-CONTRACT-001) passes against real backenddev-docs/ARCH-TESTING.md(B5): test pyramid with cost-per-tier numbers, decision tree, mock-vs-real conventions, baseline workflow, anti-patterns derived from timetable-stabilization B5 (mocking the same shape that the schema validates)1b06804).Notable scope cuts
data-*attributes; F4 picks up isolated states with stable test IDs)test.skip()with documented prototype limitationscrewli-timetable.htmlTest count
BACKLOG status
Post-merge action required
If your local environment has not run
pnpm exec playwright install chromiumbefore, do so now. Git LFS must be installed (brew install git-lfson macOS) to fetch baseline PNGs. Seedev-docs/ARCH-TESTING.md§8 for full host setup checklist.🤖 Generated with Claude Code
B1 of TEST-INFRA-001 (RFC-WS-FRONTEND-PRIMEVUE Amendment A-1). - Add @playwright/test, @playwright/experimental-ct-vue, @axe-core/playwright as dev deps in apps/app - Add @vue/compiler-dom (transitively required by ct-vue's Vite build pipeline; not auto-resolved on Vite 7) - Install Chromium via `playwright install chromium` (host cache only, not committed) - Configure Git LFS clean/smudge filters globally; track apps/app/tests/playwright-{ct,e2e}/__screenshots__/**/*.png - Integrate `git lfs pre-push` into lefthook.yml since LFS's per-repo hook would conflict with the existing sync-staleness hook - Add playwright/index.html + playwright/index.ts hook file with the full provider stack (Vuetify [TEMPORARY: replaced in F3 by PrimeVue], Pinia, TanStack Vue Query, memory-history Router with no auth guards) - Add playwright.config.ts (e2e, Chromium-only, baseURL :5173, auto- starts `pnpm dev` via webServer) - Add playwright-ct.config.ts (component testing, Linux-Chromium-only baselines, maxDiffPixelRatio 0.001, snapshot path template, ssr.noExternal: ['vuetify'] mirroring vitest.config.ts) - Add scripts: test:component, test:e2e, test:visual, test:visual:update - Add smoke test proving Chromium boots in the CT runner - Update .gitignore for Playwright runtime artifacts (test-results/, playwright-report/, blob-report/, playwright/.cache/) Vitest's existing 402 tests still pass unchanged. DoD-17 / DoD-19 CI integration deferred to TEST-INFRA-002 per Amendment A-1 scope cut (no CI exists in this repo today). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>B5 of TEST-INFRA-001 (RFC-WS-FRONTEND-PRIMEVUE Amendment A-1). - Add dev-docs/ARCH-TESTING.md (~13 KB): §1 Five-tier pyramid (Unit / Component / Integration / Visual / E2E) with environment, cost, and purpose per tier §2 Decision tree — pick by what is being verified, not by speed §3 Mock-vs-real-backend rules + the self-confirming-bias anti- pattern that motivated TEST-CONTRACT-001 §4 Visual baseline workflow including the composite-over-isolated strategy used in B3 §5 CI strategy stub — deferred to TEST-INFRA-002 §6 Conventions + 5 anti-patterns §7 Vuetify-during-PrimeVue-migration: explicit doc that the Vuetify plugin in playwright/index.ts is INTENTIONAL TEMPORARY STATE replaced in F3 by PrimeVue. Forbids the "abstract the UI framework provider" deferred-cost trap. §8 Host setup — Node, pnpm, Chromium, Git LFS, MySQL 8, PHP, .env; known risks (unpkg.com flakiness, shared crewli_test DB) §9 Deferred work cross-references to BACKLOG entries - Update CLAUDE.md ### Testing section to reference ARCH-TESTING.md - Add ARCH-TESTING.md to .claude-sync.conf so the dev-docs sync pipeline picks it up; sync script run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>