fix: feat: E2E quality gate — mobile viewports + cross-browser matrix (#1099)

Add Playwright projects for Chromium, Firefox, WebKit, iPhone 14, and
Pixel 7 viewports. Chromium runs all specs (01-07); other projects run
read-only specs (03, 06, 07) after Chromium finishes, using project
dependencies to ensure chain state exists.

Coverage audit:
- Tests 01/02 already cover /app/get-krk, /app/cheats as part of flows
- Test 03 verifies GraphQL endpoints
- Test 06 covers wallet + position dashboards
- New test 07 adds landing page and docs smoke coverage

Changes:
- playwright.config.ts: 5 projects (3 desktop browsers + 2 mobile)
- wallet-provider.ts: accept optional viewport/screen for mobile contexts
- 03, 06 specs: pass project viewport to wallet context
- 07-landing-pages.spec.ts: new spec for landing homepage + docs
- e2e.yml: timeout 600→900s for cross-browser matrix, updated comments

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
johba 2026-03-23 10:55:01 +00:00
parent 8d67e61c17
commit f3a2a7100f
6 changed files with 173 additions and 11 deletions

View file

@ -398,12 +398,14 @@ steps:
bash scripts/wait-for-service.sh http://caddy:8081/app/ 420 caddy
echo "=== Stack is healthy ==="
# Step 3: Run E2E tests
# Step 3: Run E2E tests — cross-browser matrix
# Chromium runs all specs (01-07), then Firefox/WebKit/mobile run read-only specs (03,06,07).
# The matrix is defined in playwright.config.ts via `projects`.
- name: run-e2e-tests
image: mcr.microsoft.com/playwright:v1.55.1-jammy
depends_on:
- wait-for-stack
timeout: 600
timeout: 900
environment:
STACK_BASE_URL: http://caddy:8081
STACK_RPC_URL: http://caddy:8081/api/rpc
@ -427,7 +429,7 @@ steps:
npm config set audit false
npm ci --no-audit --no-fund
echo "=== Running E2E tests (workers=1 to limit memory) ==="
echo "=== Running E2E tests — cross-browser matrix (workers=1 to limit memory) ==="
npx playwright test --reporter=list --workers=1
# Step 4: Collect artifacts