Repository navigation
test(e2e): cover att primer, clear-cache and iap negative flows N15/N19/N22 (#935) - #949
Merged
Merged
Conversation
…19/N22 (#935) Batch 5 (final) of #935's host-driven XCUITest E2E negative-flow coverage. Adds -uitest-att-primer / -uitest-clear-cache-fail / -uitest-iap-script DEBUG-only launch-arg seams (GameAppKit) so the ATT primer decline, clear-cache failure toast, and IAP purchase cancel/fail/pending flows can be driven deterministically in both apps without real ATT/CloudKit/ StoreKit 2 dependencies. Extracts three construction sites out of MakeGameApp.swift into MakeGameApp+Helpers.swift / +UITestOverrides.swift to stay under the 400-line SwiftLint ceiling. Along the way, N22's investigation surfaced and fixed a real pre-existing bug: RemoveAdsRow/RestorePurchasesRow used .buttonStyle(.plain) with an internal Spacer() but no .contentShape(Rectangle()), leaving the row's middle an untappable dead zone (the swiftui-interaction-footguns "tap target shrink" pattern) — affects real users tapping the row's center, not just the E2E driver. Doc corrections close out N16/N18/N20/N21/N23 per the batch-5 scope adjudication (issue #935 latest comment): N19's stale "#687 blocked" note and both stale code anchors are removed (fixed by ca21ca9/#690, unified by #832); N21's anchor follows the ATT coordinator extraction; N16/N18/N23 get brief unit/launch-smoke-scope closure notes; N20 is marked documentation-only. Co-Authored-By: Claude Fable 5 <[email protected]>
This was referenced Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #935
Summary
Batch 5 (final N-row group) of #935's host-driven XCUITest E2E negative-navigation coverage. Adds three new tests to both apps and closes out the remaining doc rows per the Leader's batch-5 scope adjudication (issue #935, latest comment).
Became E2E tests
-uitest-fake-ad-gate-repoll(opens the banner ad-gate, this primer's only trigger) + new-uitest-att-primer(forcesisNotDetermined→true /requestSystemPrompt→no-op). Asserts "Not now" dismisses the sheet, Home stays present, and a second background→foreground cycle does NOT re-offer (thehasOfferedlatch). New a11y idsatt.primer.continue/att.primer.notNow.ca21ca9/fix(sudoku): show failure toast when clearCache delete throws #690, unified intoGameAppKit/SettingsViewModel.swiftby refactor(mirror): unify Sudoku/MS SettingsView wrapper + Settings.bundle Root.plist into one shared source #832; the row's "blocked" note and both code anchors were stale). New-uitest-clear-cache-failswaps inUITestClearCacheFailPersistence(synthetic in-progress saved game + throwingdeleteAbandoned). New a11y idssettings.storage.clearCache(.confirm/.cancel),monetization.toast.(success/failure). Empirical finding: on this environment.confirmationDialogrenders as a centered popover (not a bottom action sheet) — therole: .cancelbutton has no discrete accessibility element; Cancel is a backdrop tap. Documented inscreen-contracts.md.-uitest-iap-scriptswaps inUITestScriptedIAPClient(scripted.userCancelled → .failed → .pending), never the real StoreKit 2 payment sheet. New a11y idsettings.iap.removeAds.Bug found and fixed along the way:
RemoveAdsRow/RestorePurchasesRowused.buttonStyle(.plain)with an internalSpacer()but no.contentShape(Rectangle())— the swiftui-interaction-footguns "tap target shrink" pattern — leaving the row's middle an untappable dead zone for real users, not just the E2E driver. Root-caused via a synchronous tap-counter probe afterprint()-based app-console debugging proved unreliable in this harness; fixed with the one-line.contentShape(Rectangle())idiom the skill prescribes.Stayed doc-only / OUT of E2E scope (per adjudication)
BootDoesNotRequestATTTests; UMP form is Google-owned/EEA-only.-uitest-route daily.makeATTPrimerCoordinator()extraction (MakeGameApp+Helpers.swift:101).Mechanical
MakeGameApp.swiftwas at the 400-line SwiftLint ceiling; the three new wiring seams are extracted intomakeIAPClient/makeATTPrimerCoordinatorhelpers (MakeGameApp+Helpers.swift) with theirresolve*gates inMakeGameApp+UITestOverrides.swift, net reducingMakeGameApp.swiftto 390 lines.SudokuE2ETests+MonetizationFlows.swiftis a new extension file (Tuist glob-discovered) splitting the three new Sudoku tests out to keepSudokuE2ETests.swiftunder 400 lines too.Test plan
swift test --package-path Packages/GameAppKit— 58/58swift test --package-path Packages/AppMonetizationKit— 120/120swift test --package-path Packages/SettingsKit— 51/51mise run test:ui sudoku— 18/18 incl.test_attPrimerDeclineDismissesAndLatches_N15,test_clearCacheCancelAndFailureToast_N19,test_iapPurchaseCancelFailPendingStayInPlace_N22mise run test:ui minesweeper— 14/14, same threemise run lint:swift_stricton all changed Swift files — 0 violations.userCancelled→.success→test_iapPurchaseCancelFailPendingStayInPlace_N22FAILS (XCTAssertFalseon "cancelled must never raise a toast"); reverted → green again🤖 Generated with Claude Code