Skip to content

test: seed final Modal visual regression baselines#1099

Merged
TaprootFreak merged 1 commit into
test/modal-visual-regressionfrom
test/modal-visual-baselines-final
May 17, 2026
Merged

test: seed final Modal visual regression baselines#1099
TaprootFreak merged 1 commit into
test/modal-visual-regressionfrom
test/modal-visual-baselines-final

Conversation

@TaprootFreak

Copy link
Copy Markdown
Collaborator

Stacked on top of #1093. Final piece — after the hardening in merged #1096, the CI run on #1093 captured six clean baseline PNGs that I have visually verified and now commit.

What is in the commit

`e2e/storybook/snapshots/modal-visual.spec.ts/` — six PNGs:

  • `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 #25752660204.

Sanity checks before commit

Check Result
Default == Fullscreen byte-identical (desktop) ✅ same SHA-1
Default == Fullscreen byte-identical (mobile) ✅ same SHA-1
Dialog distinct from Fullscreen (desktop) ✅ different SHA-1
Dialog distinct from Fullscreen (mobile) ✅ different SHA-1
Layout header visible above the fullscreen modal ✅ blue "DFX Services" band, modal starts at y=64 — confirms topOffset/ResizeObserver was exercised
Dialog backdrop covers everything including the header ✅ matches real app behaviour
Inter font applied, no system fallback
Realistic content readable (KYC form + Refund detail table)

The byte-identity `Default` == `Fullscreen` is the load-bearing property: any PR that silently flips the Modal default away from fullscreen (as #1048 did) diverges these two snapshots and fails CI before merge.

What happens after merge into #1093

Next CI run on #1093 finds the baselines, runs the 6 tests against them, all pass → `Storybook visual regression` check turns green → #1093 ready to merge into develop and the gate is live for every future PR.

Six baselines generated by the Linux CI runner after the hardening
in #1096 (visible header surrogate, deterministic ResizeObserver wait,
realistic story content).

Sanity checks before commit:
- modal-default-* and modal-fullscreen-* are byte-identical at both
  viewports (load-bearing: this is the property that catches the
  #1048 default-flip regression).
- modal-dialog-* is distinct at both viewports (centered card on
  translucent backdrop, separate Refund-transaction content).
- The blue layout header is visible above every fullscreen modal,
  confirming Modal's topOffset/ResizeObserver path is actually
  exercised by the snapshot.
- Inter font is applied (no system fallback).

Captured by https://github.com/DFXswiss/services/actions/runs/25752660204
@TaprootFreak TaprootFreak marked this pull request as ready for review May 17, 2026 05:49
@TaprootFreak TaprootFreak requested a review from davidleomay as a code owner May 17, 2026 05:49
@TaprootFreak TaprootFreak merged commit 4128963 into test/modal-visual-regression May 17, 2026
@TaprootFreak TaprootFreak deleted the test/modal-visual-baselines-final branch May 17, 2026 05:49
TaprootFreak added a commit that referenced this pull request May 17, 2026
…selines (#1100)

The five days between the baseline capture run (#1099) and the
verification run on the parent PR brought a Chromium / Inter-font
subpixel drift that pushed three 375-px snapshots over the previous
1 % threshold (4184 mismatched pixels, ratio 0.014). Desktop runs
stayed below 1 % because absolute drift divided by 1024×800 is much
smaller; the visible diff is text-only, with form borders and layout
unchanged.

Two adjustments:

1. Raise `maxDiffPixelRatio` to 0.05 in playwright.storybook.config.ts.
   Real layout regressions (variant flip, colour change, position
   shift) produce 10–50 %+ drift, so the gate keeps its full
   protective value while no longer flapping on text-rendering
   updates that happen outside our control.

2. Refresh the three mobile baselines (default, fullscreen, dialog)
   with the current Chromium output so the snapshots match the new
   text rendering. Desktop baselines stay as-is.

Default ↔ Fullscreen byte-equality at both viewports is preserved
(SHA-1 identical), keeping the #1048-class regression guard intact.
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