Skip to content

Tier 4: Evaluate visual regression testing for viewport-specific layouts #28

Description

@encomp

Context

Current tier4 specs use bounding box and visibility assertions to verify layout correctness. Visual regression testing (pixel-level screenshot comparison) would catch subtle rendering issues that structural assertions miss — e.g., overlapping elements, incorrect spacing, font rendering differences.

Scope

Evaluate whether to add visual regression testing for viewport-specific layouts:

  • Research Playwright's built-in toHaveScreenshot() API
  • Determine baseline management strategy (golden screenshots per viewport)
  • Assess CI cost (screenshot comparison adds time and storage)
  • If adopted, add visual snapshots for the 6 existing tier4 spec areas at each viewport

Trade-offs

  • Pro: Catches visual regressions that structural tests miss
  • Con: Brittle (font rendering, anti-aliasing, OS differences), requires baseline maintenance, slower CI
  • Alternative: Continue with structural assertions + manual visual QA on releases

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2High priorityenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions