Skip to content

Establish visual regression baselines for deployment preview screenshots #489

@temma02

Description

@temma02

Description

VisualRegressionTester in apps/backend/tests/visual/preview.visual.test.ts generates mock screenshots but no baselines are stored. Without baselines, the diff threshold check is never exercised and visual regressions go undetected.

Requirements and context

  • Must be secure, tested, and documented where applicable
  • Should stay reviewable and fit the current monorepo structure
  • Relevant files: apps/backend/tests/visual/preview.visual.test.ts

Suggested execution

  • Create branch: issue-015-visual-regression-baselines-deployment-preview
  • Keep changes scoped to the issue and reference the task IDs in the PR

Implement changes

  • Run storeBaseline for each template category (dex, defi, payment, asset) and commit the outputs
  • Add a CI step that runs compareWithBaseline and fails on diff > threshold
  • Document the baseline update workflow in a CONTRIBUTING.md section

Test and commit

  • Confirm compareWithBaseline returns within threshold for unchanged templates
  • Include before/after screenshots in the PR for each template category
  • Edge case: baseline file missing — test should fail with a clear message, not silently pass

Example commit message

test(visual): store initial baselines for deployment preview

Guidelines

  • Prefer small, reviewable PRs
  • Keep naming and data contracts consistent with the spec docs

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions