chore(test-infra): install Playwright + axe-core; configure CT and e2e runners; enable Git LFS for screenshots

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>
This commit is contained in:
2026-05-10 14:53:57 +02:00
parent 253f8a32e6
commit b8d18e63af
10 changed files with 500 additions and 17 deletions

View File

@@ -14,7 +14,11 @@
"msw:init": "msw init public/ --save",
"postinstall": "npm run build:icons && npm run msw:init",
"test": "vitest run",
"test:watch": "vitest"
"test:watch": "vitest",
"test:component": "playwright test --config=playwright-ct.config.ts",
"test:e2e": "playwright test --config=playwright.config.ts",
"test:visual": "playwright test --config=playwright-ct.config.ts --grep @visual",
"test:visual:update": "playwright test --config=playwright-ct.config.ts --grep @visual --update-snapshots"
},
"dependencies": {
"@casl/ability": "6.7.3",
@@ -67,6 +71,7 @@
"@antfu/eslint-config-ts": "0.43.1",
"@antfu/eslint-config-vue": "0.43.1",
"@antfu/utils": "0.7.10",
"@axe-core/playwright": "^4.11.3",
"@fullcalendar/core": "6.1.19",
"@fullcalendar/daygrid": "6.1.19",
"@fullcalendar/interaction": "6.1.19",
@@ -82,6 +87,8 @@
"@iconify/vue": "4.1.2",
"@intlify/unplugin-vue-i18n": "11.0.1",
"@pinia/testing": "^1.0.3",
"@playwright/experimental-ct-vue": "^1.59.1",
"@playwright/test": "^1.59.1",
"@stylistic/eslint-plugin-js": "0.0.4",
"@stylistic/eslint-plugin-ts": "0.0.4",
"@stylistic/stylelint-config": "1.0.1",
@@ -101,6 +108,7 @@
"@typescript-eslint/parser": "7.18.0",
"@vitejs/plugin-vue": "6.0.1",
"@vitejs/plugin-vue-jsx": "5.1.1",
"@vue/compiler-dom": "^3.5.34",
"@vue/test-utils": "^2.4.9",
"axe-core": "^4.11.4",
"baseline-browser-mapping": "^2.10.16",