Skip to content

docs(backlog): add ViewModel interaction tests + Mockable evaluation entries - #155

Merged
wei18 merged 1 commit into
mainfrom
docs/testing-backlog-mockable
May 26, 2026
Merged

wei18 merged 1 commit into
mainfrom
docs/testing-backlog-mockable

Conversation

@wei18

@wei18 wei18 commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

Two new `docs/foundations.md §Backlog` entries per 2026-05-26 user discussion about testing the 「button tap → navigate / count+=1」layer:

  • (A) Expand ViewModel interaction tests — no new dep. Reuse existing `RouteFactory` (PR feat(v2.3): Part A — Persistence + AppComposition + RouteFactory wiring #71) + swift-testing protocol-injected fakes pattern. `FakeRouteFactory` ~15 LOC + per-VM tests.
  • (B) Mockable framework evaluation — third-party, trigger-based. Documented Mockable's additional applications beyond replacing hand-rolled fakes (SwiftUI preview injection, record/replay capture, runtime mode switch).

Both are backlog-only entries. No code changes.

Test plan

  • Confirm Backlog A framing matches your earlier interaction-test ask
  • Confirm Backlog B triggers are concrete enough to fire later

🤖 Generated with Claude Code

…entries

Two new foundations §Backlog entries from 2026-05-26 user discussion:

(A) Expand ViewModel interaction tests (no new dep):
    - Real gap: snapshot covers state, but tap → navigate / tap → mutate
      uncovered systematically
    - Reuse existing RouteFactory protocol (PR #71) + swift-testing
      protocol-injected fakes
    - FakeRouteFactory ~15 LOC + per-VM ~30-60 LOC tests
    - Trigger: navigation regressions / new View without interaction test

(B) Mockable framework evaluation (trigger-based, break-glass):
    - Replace hand-rolled fakes with @mockable macro
    - Third-party SDK — requires foundations §9 break-glass justification
    - Trigger: 5+ large fakes / 3+ boilerplate review nits / SwiftUI preview
      unification
    - Other applications documented: SwiftUI #Preview injection, record/replay
      capture mode, runtime mode switch, team naming convention

Closes the user's 2026-05-26 backlog framing question about UI interaction
test gap + Mockable evaluation.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@wei18
wei18 merged commit 3f98ca2 into main May 26, 2026
1 of 2 checks passed
@wei18
wei18 deleted the docs/testing-backlog-mockable branch May 26, 2026 08:40
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.

1 participant