Skip to content

Playwright — Checklist

OWNER: marije, judith ALSO_USED_BY: ashley (adversarial), antje LAST_VERIFIED: 2026-03-26 GE_STACK_VERSION: @playwright/test ^1.58.2


PROJECT SETUP CHECKLIST

  • [ ] CHECK: playwright.config.ts exists at project root
  • [ ] CHECK: fullyParallel: true enabled
  • [ ] CHECK: retries: 2 configured for CI, retries: 0 for local
  • [ ] CHECK: trace: "on-first-retry" configured (not "on" — saves storage)
  • [ ] CHECK: screenshot: "only-on-failure" configured
  • [ ] CHECK: video: "retain-on-failure" configured (not "on")
  • [ ] CHECK: webServer configured to auto-start dev server
  • [ ] CHECK: Browser matrix includes chromium + at least one other (firefox or webkit)
  • [ ] CHECK: e2e/ directory exists with pages/, fixtures/ subdirectories
  • [ ] CHECK: .auth/ directory is in .gitignore
  • [ ] CHECK: Auth setup project saves storageState for test reuse

TEST WRITING CHECKLIST

  • [ ] CHECK: Page object exists for every page under test
  • [ ] CHECK: Locators use role/label/text (not CSS classes or XPath) IF_SKIPPED: Tests break on every styling change
  • [ ] CHECK: No page.waitForTimeout() calls in test code IF_SKIPPED: Flaky tests — the number one E2E testing problem
  • [ ] CHECK: Every test is independent — no ordering dependency
  • [ ] CHECK: Test data is unique per test (include timestamp or test name)
  • [ ] CHECK: Action methods and assertions are separate in page objects
  • [ ] CHECK: Test names describe user behavior, not implementation

NETWORK AND DATA CHECKLIST

  • [ ] CHECK: Edge cases (empty state, errors, loading) tested via page.route mocks
  • [ ] CHECK: External API calls mocked in CI — no real network dependencies
  • [ ] CHECK: File upload/download tests use Playwright event APIs (not filesystem polling)
  • [ ] CHECK: Auth state reused via storageState — login not repeated per test

VISUAL REGRESSION CHECKLIST

  • [ ] CHECK: Baseline screenshots stored in git
  • [ ] CHECK: maxDiffPixelRatio configured (0.01 recommended)
  • [ ] CHECK: Dynamic content mocked before screenshot capture
  • [ ] CHECK: Animations disabled for screenshot tests ADDED_FROM: ge-internal-2026-02, CI screenshot flakiness from CSS transitions

CI CHECKLIST

  • [ ] CHECK: workers set to 2 for CI (not unlimited — avoids memory exhaustion)
  • [ ] CHECK: forbidOnly: true in CI (prevents .only from slipping into main)
  • [ ] CHECK: HTML report uploaded as CI artifact on failure
  • [ ] CHECK: Trace files uploaded as CI artifact on failure
  • [ ] CHECK: Timezone and locale set explicitly in config IF_SKIPPED: Date-dependent tests fail on UTC CI runners
  • [ ] CHECK: Viewport set explicitly (1280x720 minimum)

MAINTENANCE CHECKLIST

  • [ ] CHECK: No test is tagged @flaky without an associated ticket and deadline
  • [ ] CHECK: Flaky tests reviewed weekly — fixed or removed
  • [ ] CHECK: Page objects updated when UI changes (not selectors in tests)
  • [ ] CHECK: Baseline screenshots updated after intentional visual changes ADDED_FROM: ge-internal-2026-03, stale baselines blocking PRs after redesign

Cross-References

READ_ALSO: wiki/docs/stack/playwright/index.md READ_ALSO: wiki/docs/stack/playwright/pitfalls.md READ_ALSO: wiki/docs/stack/vitest/checklist.md