Repository navigation
test(e2e): cover daily re-view completion close N12/N13 (#935) - #942
Merged
Merged
Conversation
wei18
added a commit
that referenced
this pull request
Jul 22, 2026
…nt (#935) CR round 1 on PR #942: MinesweeperAppComposition/LiveRouteFactory.swift:311 is the #697 comment block; the actual `onClose: { closePath?.wrappedValue.removeLast() }` sits at :326, matching the Sudoku N12 convention of anchoring the code line. Co-Authored-By: Claude <[email protected]>
Adds host-driven XCUITest E2E coverage for N12 (Sudoku) / N13 (MS): Close on the daily re-view Completion route (SUD-COMPLETION-REVIEW / MS-COMPLETION-REVIEW, pushed from a completed daily card) pops exactly one path entry back to the Daily hub. Completed-daily state lives in CloudKit Private DB and cannot be produced by real play on the CI simulator (signed-out CK degrades to "no cards"; the near-win boards use no-op persistence and write nothing), so a new DEBUG-only -uitest-seed-completed-daily launch arg (GameAppKit.UITestLaunchArg) seeds today's daily trio as already completed: - Sudoku: UITestSeededCompletedDailyPersistence (SudokuAppComposition) wraps the live PersistenceProtocol, reporting today's three daily puzzleIds as completed (fetchCompletedDailyIds/ByDay) with a frozen loadIfExists snapshot built from the real Puzzle the puzzleProvider reverse-derives for that id. - Minesweeper: MinesweeperDailyHubViewModel's completed-card tap is fully synchronous (no snapshot fetch), so only the completed-ids read needs faking. MinesweeperSavedGameStore had no protocol seam, so this extracts MinesweeperDailyOverlayReading (MinesweeperPersistence) covering exactly the two methods the VM's phase-2 overlay calls (fetchFailedDailyIds/fetchCompletedDailyIdsByDay) — verified by reading the VM's actual call sites, not by widening every consumer. UITestSeededCompletedDailyOverlayReading (MinesweeperAppComposition) is the DEBUG fake; LiveRouteFactory threads it as a separate dailyOverlayReading param alongside the existing concrete savedGameStore (which other consumers — board save/resume/replay, MinesweeperDailyOpenGuardView — keep using unchanged). New stable a11y ids anchor both tests: sudoku.dailyHub.root / minesweeper.dailyHub.root (a zero-size .background marker sibling to the week-strip header, not an ancestor of its day-dot elements — avoids the #937 "container id clobbers descendant ids" cascade) and sudoku.dailyHub.card.completed / minesweeper.dailyHub.card.completed (applied on the card's own accessibilityElement alongside its existing combined label). docs/navigation-flows.md's N12/N13 anchors were stale (:226/:282); fixed to :260/:311 and cross-referenced to the new E2E tests. docs/screen-contracts.md documents the new ids and the E2E coverage. Both new tests were verified to fail (no completed card to tap) with the seed temporarily forced off, then pass again once restored. Part of #935. Co-Authored-By: Claude <[email protected]>
…nt (#935) CR round 1 on PR #942: MinesweeperAppComposition/LiveRouteFactory.swift:311 is the #697 comment block; the actual `onClose: { closePath?.wrappedValue.removeLast() }` sits at :326, matching the Sudoku N12 convention of anchoring the code line. Co-Authored-By: Claude <[email protected]>
wei18
force-pushed
the
test/e2e-negative-nav-935-b3
branch
from
July 23, 2026 04:21
62d56be to
a4a55a5
Compare
wei18
enabled auto-merge (squash)
July 23, 2026 04:21
This was referenced Jul 23, 2026
Closed
wei18
added a commit
that referenced
this pull request
Jul 27, 2026
…951) (#952) Pulls wei18/apple-dev-skills#41 into the submodule pointer: the swiftui-interaction-footguns skill now documents that a container's accessibilityIdentifier can clobber its descendants' own ids in the XCUITest AX tree, with the leaf / sibling-marker fixes and the ScrollView counter-example. Both sightings came out of this repo's #935 E2E batches (#937 exhausted-block buttons, #942 daily-hub root anchors). Closes #951 Co-authored-by: Claude <[email protected]>
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 (batch 3 — N12/N13; the issue stays open for the remaining N-row batches).
Summary
daily re-view
SUD-COMPLETION-REVIEW/MS-COMPLETION-REVIEWroute popsexactly one path entry back to the Daily hub.
real play on the CI simulator (signed-out CK degrades to "no cards"; the
near-win boards use no-op persistence). A new DEBUG-only
-uitest-seed-completed-dailylaunch arg seeds today's daily trio asalready completed:
UITestSeededCompletedDailyPersistencewraps the livePersistenceProtocol, sinceDailyHubViewModel.openCompleteddoes anasync
loadIfExistsround trip before pushing.completion.MinesweeperDailyHubViewModel.cardTappedpushes.completionsynchronously offcard.isCompletedalone — no snapshotfetch.
MinesweeperSavedGameStorehad no protocol seam, so this extractsMinesweeperDailyOverlayReading, narrowed to exactly the two methods theVM's phase-2 overlay actually calls (
fetchFailedDailyIds(for:)/fetchCompletedDailyIdsByDay()— verified by reading the VM's real callsites, not assumed).
LiveRouteFactorythreads the DEBUG fake as aseparate
dailyOverlayReadingparam alongside the existing concretesavedGameStore, so board save/resume/replay andMinesweeperDailyOpenGuardViewkeep using the concrete store unchanged.sudoku.dailyHub.root/minesweeper.dailyHub.root(a zero-size
.backgroundmarker sibling to the week-strip header — not anancestor of its day-dot elements, avoiding the test(e2e): cover sudoku hub failure flows N3-N5 (#935) #937 "container id clobbers
descendant ids" cascade) and
sudoku.dailyHub.card.completed/minesweeper.dailyHub.card.completed(on the card's ownaccessibilityElement, alongside its existing combined label).docs/navigation-flows.md's N12/N13 code anchors were stale (:226/:282— pre-fix(minesweeper): completion re-view Close should pop one level to mirror sudoku #697 line numbers); corrected to
:260/:326and cross-referenced tothe new tests.
docs/screen-contracts.mddocuments the new ids + E2Ecoverage note.
f1aee21after perf(daily): parallelize best-time fetches and enable difficulty cards before phase-2 lands #943 (parallelized daily best-time fetches)and fix(sudoku): sticky digit-first — armed digit survives taps on non-empty cells #944 landed concurrently; conflicts in the two DailyHubView files were
resolved preserving both perf(daily): parallelize best-time fetches and enable difficulty cards before phase-2 lands #943's changes and the new a11y markers, and both
E2E suites re-ran green post-rebase.
Test plan
swift test --package-path Packages/GameAppKit— 50/50 passedswift test --package-path Packages/MinesweeperKit— 370/370 passed(protocol conformance change → full suite per repo rule)
swift test --package-path Packages/SudokuKit— hit the known localfull-suite segfault flake (unrelated to this diff, see
reference/sudokukit-full-suite-segfault-local.md); filtered--filter "DailyHub|SudokuAppComposition|RouteFactory"→ 101/101 passedmise run test:ui sudoku→ 13/13 includingtest_completionReviewCloseLandsOnDailyHub_N12(re-run green post-rebase)mise run test:ui minesweeper→ 9/9 includingtest_completionReviewCloseLandsOnDailyHub_N13(re-run green post-rebase)mise run lint:swift_strict <changed files>→ 0 violationsskip the fake (seed off) → both new tests FAIL (no completed card to
tap) → restored → both pass again
🤖 Generated with Claude Code