1.0 KiB
1.0 KiB
E2E tests
This project uses Playwright for end-to-end tests.
Test tiers
mock: deterministic browser tests against the local Next.js app with mocked backend APIs.real-backend: smoke tests against a deployed frontend and real backend APIs.prod-smoke: production smoke tests. Keep these non-destructive: no real OAuth completion, no real payment submission, and no high-volume chat actions.
Commands
pnpm test:e2e
pnpm test:e2e:chrome
pnpm test:e2e:real
pnpm test:e2e:prod
pnpm test:e2e uses Playwright-managed Chromium. If the browser binary is not installed yet, run:
pnpm exec playwright install chromium
For local development on macOS, pnpm test:e2e:chrome can reuse the installed Google Chrome.
Environment overrides
PLAYWRIGHT_BASE_URL=https://frontend-test.banlv-ai.com \
E2E_API_BASE_URL=https://proapi.banlv-ai.com \
pnpm test:e2e:real
PLAYWRIGHT_BASE_URL=https://cozsweet.com \
E2E_API_BASE_URL=https://proapi.banlv-ai.com \
pnpm test:e2e:prod