3.1 KiB
Memento visual baseline provenance
Authority
The visual authority is the approved Beta prototype captured from Git commit
85c804b0301091b36fc48a83ae501570340269e7, preserved under
tests/fixtures/memento-visual-baseline/legacy/.
The normal 26-surface Playwright snapshots are regression evidence for the React implementation. The separate legacy-parity suite proves that those React surfaces remain within the approved prototype rendering envelope; snapshot files are not treated as self-authorizing design truth.
Rendering conditions
- Browser: repository Playwright Chromium
- Desktop viewport: 1600 × 1100
- Mobile viewport: 390 × 844
- Auth viewport: 1440 × 1000
- Color scheme: light
- Locale: en-US
- Media: identical
public/assetsbytes for both renderers - Map iframe: hidden in both renderers before capture
- Animations: disabled before capture
- Fonts: same host/browser font environment for both renderers
The comparison requires identical screenshot dimensions. Pixel differences are measured from two screenshots produced in the same Playwright run.
Difference policy
A visual diff is not fixed by updating a snapshot.
- Identify the DOM/CSS source of the diff.
- Confirm that layout dimensions, product colors, spacing, and typography values still come from the approved design contract.
- If the change is intentional, review and approve the design change first.
- Only after approval may the React regression snapshot be updated.
The legacy-parity gate uses two independent limits. First, any changed pixel
must remain at or below 0.5% of the surface. Second, a material pixel—one
whose maximum RGBA channel delta exceeds 13/255 (roughly 5%)—must remain at
or below 0.2%. This separates harmless font/native-control rasterization from
meaningful layout or color drift. Screenshot dimension mismatch always fails.
A diff above either envelope must be investigated; increasing either limit is
not an acceptable way to make the test green.
Accessibility interaction with the visual lock
The approved legacy palette contains known WCAG AA color-contrast debt. During this migration the visual authority has higher precedence than an unreviewed palette change: changing those colors would invalidate the direct legacy ↔ React parity evidence.
For routes owned by memento-web, the generic Axe E2E suite therefore waives
only the color-contrast rule. Critical/serious findings from every other
Axe rule remain blocking. This is an explicit migration debt, not an assertion
that the current palette is accessible.
Removing this waiver requires a separately approved Memento design-system change. That change must update the visual authority/baselines and accessibility evidence together; the waiver must not be broadened to other Axe rules.
Commands
- React regression:
corepack pnpm test:visual - Approved legacy ↔ React:
corepack pnpm test:visual:memento-legacy - Snapshot update after explicit design approval only:
corepack pnpm test:visual:update
The legacy fixture itself is immutable migration evidence. Regenerating it from the current React implementation is prohibited.