Skip to content

test: seed initial Modal visual regression baselines#1095

Closed
TaprootFreak wants to merge 1 commit into
test/modal-visual-regressionfrom
test/modal-visual-baselines-seed-final
Closed

test: seed initial Modal visual regression baselines#1095
TaprootFreak wants to merge 1 commit into
test/modal-visual-regressionfrom
test/modal-visual-baselines-seed-final

Conversation

@TaprootFreak

Copy link
Copy Markdown
Collaborator

Stacked on top of #1093 (parent), follow-up to merged #1094 (rendering fixes).

What

Six baseline PNGs captured by the Linux CI runner after the serve.json + snapshotPathTemplate fix from #1094 made the stories render correctly:

  • modal-default-desktop.png / modal-default-mobile.png
  • modal-fullscreen-desktop.png / modal-fullscreen-mobile.png
  • modal-dialog-desktop.png / modal-dialog-mobile.png

Source: Actions run #25744377295, the first one to run with the fixes applied.

Sanity checks before committing

Check Result
Default == Fullscreen byte-identical (desktop) ✅ same SHA-1
Default == Fullscreen byte-identical (mobile) ✅ same SHA-1
Dialog distinct from Fullscreen ✅ different SHA-1 at both viewports
Inter font applied (not system fallback) ✅ visually confirmed
Fullscreen renders full white panel ✅ visually confirmed
Dialog renders centered card on grey backdrop ✅ visually confirmed

The byte-identity of `Default` and `Fullscreen` is the load-bearing property of this guard: any future PR that silently flips the Modal default away from fullscreen (as PR #1048 did) will diverge these two snapshots and fail CI before merge.

What happens after merge into #1093

Next CI run on #1093 finds the baselines in `e2e/storybook/snapshots/modal-visual.spec.ts/`, runs the 6 tests against them, all pass → `Storybook visual regression` check turns green → the gate is live and #1093 is ready for review.

Six baseline PNGs (3 stories × 2 viewports) captured on the Linux CI
runner after the serve.json + snapshotPathTemplate fix (#1094) made
the Storybook stories actually render under the visual test harness.

Sanity checks:
- modal-default-* and modal-fullscreen-* are byte-identical at every
  viewport. That is the load-bearing property: any future PR that
  silently flips the Modal default away from fullscreen (as PR #1048
  did) will diverge these two snapshots and fail the gate.
- modal-dialog-* shows the centered card on the translucent backdrop,
  distinct from the fullscreen variant.

Captured by https://github.com/DFXswiss/services/actions/runs/25744377295
@TaprootFreak

Copy link
Copy Markdown
Collaborator Author

Schliessen statt mergen — Decorator und Stories werden in einem Folge-PR robuster gemacht (deterministischer topOffset, realistischer Story-Inhalt, expliziter Wait im Spec). Die Baselines hier wären nach diesen Änderungen sowieso obsolet. Finale Baselines kommen als separater stacked PR nach dem Improvement-PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant