Files
cozsweet-frontend-nextjs/e2e
Codex 8f8e067d82
Docker Image / Build and Push Docker Image (push) Successful in 2m4s
fix(payment): allow Stripe after closing QRIS
2026-07-29 14:33:53 +08:00
..

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:mobile-smoke
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.

pnpm test:e2e:mobile-smoke runs the critical authentication, logout, token refresh and paid-image unlock paths with the Pixel 7 profile. CI 在所有 pull request 以及 dev / pre / main push 时运行这一层测试。

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://api.banlv-ai.com \
pnpm test:e2e:prod