Skip to content

chore(tests): stabilize the banner-reserved board snapshot fixtures - #737

Merged
wei18 merged 1 commit into
mainfrom
chore/732-stabilize-banner-fixtures
Jul 8, 2026
Merged

wei18 merged 1 commit into
mainfrom
chore/732-stabilize-banner-fixtures

Conversation

@wei18

@wei18 wei18 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Closes #732 — the #723 banner-reserved fixtures captured BannerSlotView's live ProgressView, whose indeterminate spin animation is timing-dependent; #714 verification found pixel drift on an unmodified commit across worktree runs, and .tolerantImage alone can't absorb the spinner's changing SHAPE.

What (7 files, +81/−5)

  • BannerSlotView: a test/preview-only \.bannerSlotLoadingPreview environment override (default nil — production spinner path byte-identical; the else branch is the original ProgressView().controlSize(.small).tint(progressTint) verbatim). Injected only by snapshot tests from OUTSIDE the view tree, so no production call site changes.
  • Both apps' board-banner fixtures now inject a static Circle().strokeBorder placeholder instead of the live spinner, and keep .tolerantImage (test(minesweeper): strict .image for content snapshot suites (#487, #517) #586 board-suite convention) as a second line of defense. 4 PNGs re-recorded (MS + Sudoku, light + dark).

Verification

  • Target filters ran 3 consecutive local passes (passed, not recorded) in the same worktree — the drift is gone. AppMonetizationKit 120/120, MinesweeperKit 224/224, SudokuKit 270/270.
  • swiftlint --strict 0.

Review

Leader read the production hunk inline (nil default preserves the original path exactly); haiku verified scope discipline, the symmetric injection across both apps, the 4-PNG re-record count, and the nonisolated(unsafe) nil-defaultValue safety argument. No findings.

🤖 Generated with Claude Code

The #723 banner-reserved fixtures captured BannerSlotView's live
ProgressView, whose indeterminate spin animation is timing-dependent —
#714 verification found pixel drift on an unmodified commit across
worktree runs. Add a `bannerSlotLoadingPreview` environment override on
BannerSlotView (default nil, production spinner unchanged) so these
fixtures can inject a static placeholder from outside the view tree,
and keep the existing `.tolerantImage` (#586 board-suite convention) as
a second line of defense. Re-recorded the 4 affected PNGs (MS + Sudoku,
light + dark); each filter passed 3 consecutive local runs.

closes #732

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 enabled auto-merge (squash) July 8, 2026 13:01
@wei18
wei18 merged commit fd54391 into main Jul 8, 2026
4 checks passed
@wei18
wei18 deleted the chore/732-stabilize-banner-fixtures branch July 8, 2026 13:01
@wei18 wei18 mentioned this pull request Jul 12, 2026
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.

chore(tests): new banner-reserved snapshots are environment-sensitive — switch to tolerantImage

1 participant