Add Playwright visual regression tests at 320px, 768px, and 1440px breakpoints #124
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The E2E suite takes screenshots only on test failure — reactive, not proactive. There are no baseline screenshot comparisons. A layout regression at mobile (320px) or desktop (1440px) won't be caught unless it also breaks a functional assertion. Visual regressions from CSS changes are invisible to CI.
Why This Matters
Tailwind CSS 4 utility changes, component restructuring, and i18n string length differences all affect layout in ways that functional tests don't catch. A misaligned save bar on mobile, an overflowing tag list at tablet width, or a broken dark mode contrast ratio are real user-facing bugs that the current test suite would ship silently.
What Needs To Be Done
Create
e2e/visual.spec.tswith snapshot tests at each breakpoint:Run in both light mode and dark mode (Playwright's
colorSchemeoption)Store baseline snapshots in
e2e/snapshots/and commit them to the repoCI uploads a diff report as an artifact when snapshots don't match
Diffs are reviewed and approved before merge (not auto-approved)
Priority pages for visual regression
Acceptance Criteria
Architect review (@mkeller): Descoping for now.
24 committed baseline screenshots (4 pages × 3 breakpoints × 2 color schemes) create significant friction during active UI development. Every intentional CSS change — Tailwind utility tweak, component restructure, i18n string length difference — invalidates baselines and triggers a snapshot update cycle. During active development that cost is too high relative to the value.
Visual regression testing is the right tool for a UI in maintenance mode where stability is the primary concern. Come back to this ticket once the UI has settled and layout regressions are the main risk. The functional E2E tests and accessibility checks from #118 cover the meaningful regression surface for now.