test(e2e): add playwright smoke coverage
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
pnpm exec playwright install chromium
|
||||
```
|
||||
|
||||
For local development on macOS, `pnpm test:e2e:chrome` can reuse the installed Google Chrome.
|
||||
|
||||
## Environment overrides
|
||||
|
||||
```bash
|
||||
PLAYWRIGHT_BASE_URL=https://frontend-test.banlv-ai.com \
|
||||
E2E_API_BASE_URL=https://proapi.banlv-ai.com \
|
||||
pnpm test:e2e:real
|
||||
```
|
||||
|
||||
```bash
|
||||
PLAYWRIGHT_BASE_URL=https://cozsweet.com \
|
||||
E2E_API_BASE_URL=https://proapi.banlv-ai.com \
|
||||
pnpm test:e2e:prod
|
||||
```
|
||||
Reference in New Issue
Block a user