ADR-FE-0001: Adopt Playwright for end-to-end testing
Proposed: 2025-08-11
Proposed
testing
e2e
playwright
Context
We currently lack full end-to-end coverage for critical workflows (login, checkout, admin actions).
Manual testing is time-consuming and error-prone, especially across browsers.
Decision
Adopt Playwright for E2E testing, integrated into the CI pipeline.
Use it for cross-browser regression checks and smoke tests before deployment.
Options Considered
| Option | Summary | Why not chosen |
|---|---|---|
| Selenium | Mature, large ecosystem | Slower, more verbose API |
| Cypress | Great DX, built-in retryability | No native cross-browser in CI until paid tier |
| Playwright | Fast, multi-browser, good API + tracing | Requires some new learning curve |
Pros
- Native support for Chromium, Firefox, WebKit
- Built-in parallelization and trace viewer
- Easy CI integration with GitHub Actions
- TypeScript-first API
Cons
- Additional setup in pipeline runners
- Tests can be flaky without proper wait handling
- Learning curve for team
Implementation Notes
- Store tests in
apps/tests/e2ewith workspace config - Run nightly full suite, PR smoke suite
- Use Playwright trace viewer for debugging failures
- Add minimal data seeding per environment to keep tests deterministic