Playwright (@playwright/test) — browser-level integration tests.
Config: playwright.config.ts
- Base URL:
http://localhost:3000(or$BASE_URL) - Browser: Chromium only
- Auto-starts dev server unless
reuseExistingServerapplies
| File | What it tests |
|---|---|
tests/navigation.spec.ts |
Page load, / → /en redirect, "Get started" button → intro page |
tests/mermaid.spec.ts |
Mermaid diagram visible on /en/getting-started/markdown, SVG loaded |
npx playwright test --project=chromiumnpm run build
$env:TEST_MODE="prod"; npx playwright test --project=chromiumProduction mode starts .amplify-hosting/compute/default/server.js instead of the dev server.
npx playwright show-reportReport saved to playwright-report/index.html.
test-results/ — raw Playwright artifacts (traces, screenshots on failure). In .gitignore.
Place new *.spec.ts files in tests/. Playwright picks them up automatically.
Key selectors already in use:
.mermaid-diagram— Mermaid containerh1— page titlerole=linkwith name matching