Skip to content

test(minesweeper): assert controller reads MS product display price (#262) - #271

Merged
wei18 merged 1 commit into
mainfrom
test/ms-productid-display-price-262
Jun 3, 2026
Merged

wei18 merged 1 commit into
mainfrom
test/ms-productid-display-price-262

Conversation

@wei18

@wei18 wei18 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Closes #262.

monetizationControllerUsesMSProductId only asserted the "$2.99" empty-catalog fallback — identical for Sudoku and MS, so it never proved the productId actually threads through.

New monetizationControllerReadsMSProductDisplayPrice seeds the preview FakeIAPClient with a minesweeperRemoveAdsProductId product priced "$4.99", bootstraps, and asserts removeAdsDisplayPrice == "$4.99". Negative control: had the composition wired Sudoku's removeAdsProductId, the first(where: { $0.id == productId }) lookup would miss and fall back to "$2.99", failing the assertion.

Verified: swift test --filter MinesweeperAppCompositionTests → 7 tests pass.

🤖 Generated with Claude Code

…262)

Harden monetizationControllerUsesMSProductId: the prior sentinel only
checked the "$2.99" empty-catalog fallback (identical for Sudoku/MS). This
seeds the preview FakeIAPClient with a minesweeperRemoveAdsProductId product
priced "$4.99", bootstraps, and asserts removeAdsDisplayPrice surfaces it —
proving the controller threads the MS productId, not Sudoku's.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@wei18
wei18 merged commit d93b4e3 into main Jun 3, 2026
@wei18
wei18 deleted the test/ms-productid-display-price-262 branch June 3, 2026 08:11
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.

test(monetization): harden MS MonetizationStateController productId assertion

1 participant