Files
cozsweet-frontend-nextjs/e2e
admin 9deb320cf6 feat(profile)!: replace sidebar and add avatar navigation
Rename the global Sidebar route, UI, assets, analytics, and payment return context to Profile. Add accessible message-avatar navigation and preserve the source character across auth and logout flows.

BREAKING CHANGE: /sidebar has been removed; use /profile instead.
2026-07-21 18:08:12 +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 runs this tier on every pull request and dev / test / 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://proapi.banlv-ai.com \
pnpm test:e2e:prod