Files
crewli/.gitignore
bert.hausmans 2dfb1e8bae test(e2e): real-backend 409 conflict contract test (TEST-CONTRACT-001)
B4 of TEST-INFRA-001 (RFC-WS-FRONTEND-PRIMEVUE Amendment A-1).

- Add api/database/seeders/E2EBaselineSeeder.php — deterministic seed
  for Playwright e2e: e2e@test.local user (org_admin) on a fresh org +
  event + stage + StageDay + artist + engagement + performance
  (version=0). Writes seeded IDs to api/storage/app/e2e-fixtures.json
  so the Playwright fixture can construct API URLs without API
  discovery calls.
- Add apps/app/tests/playwright-e2e/global-setup.ts — runs
  `php artisan migrate:fresh --force --seed` against crewli_test (the
  existing PHPUnit MySQL test DB) before the test suite starts.
  Uses --env=testing to satisfy the dangerous-bash hook's migrate:fresh
  guard.
- Add apps/app/tests/playwright-e2e/utils/fixtures.ts — typed reader
  for e2e-fixtures.json. Cached after first read.
- Add apps/app/tests/playwright-e2e/utils/auth.ts — login helper that
  POSTs /api/v1/auth/login and returns user/org IDs. Uses Bearer-via-
  cookie flow (per api/.../SetAuthCookie.php), not stateful Sanctum.
- Add apps/app/tests/playwright-e2e/timetable/409-conflict.spec.ts —
  the contract test: first move with version=0 returns 200, second
  move with same stale version returns 409 with shape
  `errors.conflict: 'version_mismatch'`. Catches the schema-drift
  bug class that timetable-stabilization B5 surfaced.
- Update apps/app/playwright.config.ts — wire globalSetup, webServer
  for `php artisan serve --port=8001`, baseURL `http://localhost:8001`
  (NOT 127.0.0.1 — auth cookie's domain=localhost requires hostname
  match).
- Update .gitignore — runtime e2e-fixtures.json never committed.

DoD-19 met locally: `pnpm test:e2e` passes against a real Laravel
test server. CI integration deferred to TEST-INFRA-002 (per A-1
amendment).

Constraint: e2e tests share the crewli_test DB with PHPUnit. Running
both concurrently would collide. Documented in ARCH-TESTING.md (B5).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 15:24:33 +02:00

84 lines
1.6 KiB
Plaintext

# Dependencies
node_modules/
vendor/
# Build outputs
dist/
build/
public/build/
public/hot
# Environment files
.env
.env.local
.env.*.local
!.env.example
# IDE
.idea/
*.swp
*.swo
.DS_Store
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
storage/logs/*
!storage/logs/.gitkeep
# Laravel
bootstrap/cache/*
!bootstrap/cache/.gitkeep
storage/framework/cache/*
storage/framework/sessions/*
storage/framework/views/*
# Testing
.phpunit.result.cache
coverage/
# Playwright runtime artifacts (test-results, blob-report, html-report,
# .cache build dir, playwright traces). __screenshots__/ is committed
# (via Git LFS, see .gitattributes).
apps/app/test-results/
apps/app/playwright-report/
apps/app/blob-report/
apps/app/playwright/.cache/
# Playwright e2e seed-data fixture file — written by E2EBaselineSeeder
# during globalSetup, never source-of-truth.
api/storage/app/e2e-fixtures.json
# Misc
*.pem
.cache/
# Design / assets temp files (e.g. Illustrator)
resources/**/*.tmp
resources/**/design-files/
# VitePress
docs/.vitepress/dist
docs/.vitepress/cache
# Local deploy wrapper (per-developer SSH alias)
/run-deploy-from-local.sh
!/run-deploy-from-local.example.sh
# Claude Project Knowledge sync output (regenerated by scripts/sync-claude-docs.sh)
.claude-sync/
# Claude Code runtime state
.claude/*.lock
# GlitchTip
docker/glitchtip/.env
backups/
# WS-7 RFC §3.5: Vite sourcemaps are uploaded to GlitchTip and stripped
# from dist/ before deploy. Defensive exclusion in case dist/ is ever
# committed by mistake (it's already covered by `dist/` above).
apps/app/dist/**/*.map