Add Playwright E2E testing infrastructure
- New apps/e2e workspace with @playwright/test - playwright.config.ts targeting Docker Compose stack (http://localhost:8080) - navigation.spec.ts: smoke tests for all pages - book.spec.ts: full booking wizard happy-path with API mocking - clients.spec.ts: client list and detail panel tests - CI job: spins up docker compose, installs Playwright chromium, runs tests - Playwright report uploaded as artifact on failure - README docs for running E2E tests locally Closes #40 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
committed by
Groom Book CTO
parent
cba502e35f
commit
a045749673
@@ -48,6 +48,45 @@ jobs:
|
||||
- name: Run tests
|
||||
run: pnpm test
|
||||
|
||||
e2e:
|
||||
name: E2E Tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint-typecheck, test]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: pnpm --filter @groombook/e2e exec playwright install --with-deps chromium
|
||||
|
||||
- name: Start Docker Compose stack
|
||||
run: docker compose up -d --wait
|
||||
timeout-minutes: 5
|
||||
|
||||
- name: Run E2E tests
|
||||
run: pnpm --filter @groombook/e2e test
|
||||
|
||||
- name: Upload Playwright report
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: playwright-report
|
||||
path: apps/e2e/playwright-report/
|
||||
retention-days: 7
|
||||
|
||||
- name: Stop Docker Compose stack
|
||||
if: always()
|
||||
run: docker compose down
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user