Skip to content

fix(test): update stale $2.99 IAP price mocks + baselines to $0.99 - #1002

Merged
wei18 merged 1 commit into
mainfrom
fix/981-iap-price-baselines
Aug 11, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/981-iap-price-baselines

Conversation

@wei18

@wei18 wei18 commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • SudokuUITests fixtures mocked the Remove Ads IAP price as $2.99; the live price is $0.99. The app's real price handling was never wrong — this was test-fixture-only drift.
  • Updated every displayPrice: "$2.99" mock literal (and the paired #expect(... == "$2.99") assertion in SettingsIAPRowTests) to "$0.99" across 9 test files in SudokuUITests and AppMonetizationKit. Left IAPClient.swift:33 alone — that's a doc-comment example, not a fixture.
  • Re-recorded the 6 committed snapshot baselines whose sole visible change is the price string (deleted stale PNGs, ran swift test --filter to record, ran again to confirm green).
  • SettingsViewAppStoreRowsTests's baseline was previously rejected as a candidate for the feat(store): direction C+B marketing screenshot redesign #976 marketing-frame fixture solely because of this stale $2.99; it becomes a candidate again now that it reads $0.99.

Re-recorded baselines + pixel-diff bounding boxes (old vs. new, same size, single tight region each)

Baseline Size Diff bbox (x0,y0,x1,y1)
SettingsViewAppStoreRowsTests/snapshot_iPhone_light_withAppStoreRowsAndInviteFriends...png 786×1704 (669,117)–(687,141)
SettingsViewTests/snapshot_iPhone_light_unpurchased...png 786×1704 (669,117)–(687,141)
SettingsViewTests/snapshot_iPhone_dark_unpurchased...png 786×1704 (669,117)–(687,141)
SettingsViewTests/snapshot_mac_light_unpurchased...png 1800×1200 (1527,117)–(1545,141)
SettingsIAPRowTests/snapshotRowsIPhoneLightUnpurchased...png 786×440 (669,117)–(687,141)
SettingsIAPRowTests/snapshotRowsIPhoneLightPurchaseFailed...png 786×440 (669,117)–(687,141)

Every diff is an identical 18×24pt box at the same relative position (the price label), confirming nothing else moved. Opened two of the regenerated PNGs directly (magnified crops) and visually confirmed $2.99 → $0.99. The purchased variants (no price shown) are untouched — verified via git status.

Test plan

  • swift test --package-path Packages/SudokuKit --filter SettingsViewTests — 15/15 pass
  • swift test --package-path Packages/SudokuKit --filter SettingsIAPRowTests — 10/10 pass
  • swift test --package-path Packages/SudokuKit --filter SettingsViewAppStoreRowsTests — 4/4 pass
  • swift test --package-path Packages/SudokuKit --filter MonetizationStateControllerUpdatesTests — 6/6 pass
  • swift test --package-path Packages/SudokuKit --filter SettingsViewWindowSnapshotTests — 2/2 pass (no committed baseline, unaffected)
  • swift test --package-path Packages/SudokuKit --filter ASCScreenshotEmitTests — 9/9 skipped (gated on ASC_EMIT_SCREENSHOTS, unaffected)
  • swift test --package-path Packages/AppMonetizationKit — 122/122 pass
  • git status clean except the 9 swift files + 6 PNGs listed above

closes #981

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) [email protected]

SudokuUITests fixtures hardcoded the Remove Ads IAP price as `$2.99`
across several `IAPProduct` mocks; the live price is `$0.99` (already
the fallback value in `SettingsIAPRowTests.unpurchased_displayPrice_
fallsBackTo0_99WhenLookupEmpty`). The app itself was never wrong — this
was fixture-only drift.

Updated all `displayPrice: "$2.99"` mock literals to `"$0.99"` across
SudokuUITests and AppMonetizationKit tests (the doc-comment example in
IAPClient.swift is left as-is; it isn't a fixture). Re-recorded the 6
committed snapshot baselines whose sole visible change is the price
text — confirmed via pixel-diff bounding box (18x24pt, same relative
position in each) and by opening the regenerated PNGs.

`SettingsViewAppStoreRowsTests`'s baseline was previously rejected as
a candidate for the #976 marketing-frame fixture solely because of
this stale price; it becomes a candidate again now that it reads
$0.99.

closes #981

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@wei18
wei18 merged commit 98c3d80 into main Aug 11, 2026
5 checks passed
@wei18
wei18 deleted the fix/981-iap-price-baselines branch August 11, 2026 11:24
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.

fix: SudokuKit settings snapshot baselines still show stale $2.99 IAP price

1 participant