Repository navigation
Commit 9c06cd2
refactor(daemon): relocate the interaction touch tests by what they assert (#3672)
* test(daemon): add the interactor-resolution fixture and the touch command surface fake
The interactor-resolution fixture replaces the snapshot-interactor-capture module mock: captures
reach one spy through the installed InteractorResolution. The touch surface fake dispatches resolved
targets through the runtime config's backend and reads the session through its store, so daemon
suites pin admission, bound-operation wiring, response shaping, and capture wiring without the
real command family.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(daemon): place the touch router ownership tests beside the interaction handler
interaction-touch.test.ts is (a) daemon logic: router claims press/click/longpress/hover/fill,
single inspect/bind, macOS surface refusals, hover capability refusal. All 12 tests move to
execution/interaction/internal/interaction-touch-routing.test.ts on the touch surface fake.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(daemon): split press admission and press target tests by what each asserts
interaction-touch-press-admission.test.ts: (a) 12 tests move to the daemon package on the touch
surface fake; the #1654 provenance-mismatch test is (c) and moves to
src/commands/interaction/runtime/interactions-preresolved-target.test.ts.
interaction-touch-press.test.ts: (a) secondary-button projection, the find pre-resolved wiring
(adopt, control, no lookup) and read-after-press capture stay in the daemon package; the macOS
menubar wrapper promotion, hittable-ancestor promotion, full-screen non-promotion (interactions-
target-promotion.test.ts) and the pre-resolved adopt/control/no-lookup/shared-guard cases
(interactions-preresolved-target.test.ts) are (c) and run against the real command runtime.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(daemon): split fill and runtime-dispatch tests by what each asserts
interaction-touch-fill.test.ts: (a) expired-frame rejection, pinned stale/current ref, and the
find-internal fill without a stale-ref warning move to the daemon package (plus one new test that
the resolved point, typing delay and recorded ref reach the bound fill). The off-screen refusal,
invalid-bounds refusal and editable-node retention are (c): interactions-ref-frame-evidence.test.ts
and interactions-target-promotion.test.ts.
interaction-touch-runtime.test.ts: (a) the resolved-point tap/record test and the #1542 rescue
hook wiring (hook present iff the owner advertises querySelector) move to the daemon package; the
invalid-bounds, off-screen refusal and in-frame label recovery cases are (c) in
interactions-ref-frame-evidence.test.ts (the missing-rect refusal is already
ref-target-resolution.test.ts).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(daemon): place touch response, payload and prepare tests beside their modules
interaction-touch-response.test.ts (6), interaction-touch-payload.test.ts (7) and
interaction-touch-prepare.test.ts (5) are (a) daemon logic: evidence rides the response allowlist
only when --verify ran, recording/visualization payloads and reference frames, and the settle
observation capture the request admitted. They move to execution/interaction/internal/ on the touch
surface fake, the interactor-resolution fixture and daemonPlatformServicesFixture. The --verify
evidence computation itself stays covered by the real-runtime tests in
src/commands/interaction/runtime/interactions.test.ts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(daemon): place the Android freshness and readiness tests beside their modules
interaction-touch-android-freshness.test.ts (4) and interaction-touch-android-readiness.test.ts
(7) are (a) daemon logic: the freshness refresh may not retarget an admitted ref, the escape and
permission-prompt outcomes, and recovery aborting an admitted ref. They move to
execution/interaction/internal/. The readiness suite now mocks the exact android-system-dialog
module the handler imports.
interaction-touch-android-readiness-spawns.test.ts is (a): the two-checks-per-tap dumpsys budget is
pinned through the real Android observation adapter over a counting runAdb host port instead of
the root adb provider and host binding.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(daemon): place the direct-iOS selector tap tests beside the press handler
interaction-touch-direct-ios.test.ts (6) and interaction-touch-direct-ios-eligibility.test.ts (4)
are (a) daemon logic: the Maestro-only direct selector route, its error passthrough, the fused
ref-frame seam, and the maestro-direct dispatch-disclosure rows. They move to
execution/interaction/internal/. The dispatch-disclosure driver owner and the boundary-fault-matrix
evidence path follow the moved driver file.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(daemon): place the iOS tap outcome and drag tests beside their modules
interaction-ios-tap-outcome.test.ts (22) and interaction-gesture-drag.test.ts (2) are (a) daemon
logic: same-scope corroboration of a failed iOS tap, the recorded drag with both endpoint
identities, one inspect/bind per drag, and frame expiry. They move to
execution/interaction/internal/ on the touch surface fake (which now answers a target-authored
drag through one backend plan). The drag endpoint resolution and disclosure stay covered by
src/commands/interaction/runtime/gestures.test.ts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(daemon): split the get and is read tests by what each asserts
interaction-get.test.ts: (a) the 9 get tests (bound read expansion, no live read, retired direct
selector, frame-tree @ref reads and their warnings) move to execution/selector-runtime-get-reads
.test.ts and the 5 is tests that pin capture wiring and the Android foreground blocker move to
execution/selector-runtime-is-reads.test.ts. The two predicate-semantics tests (is visible
inheriting ancestor viewport visibility, is visible failing outside the viewport) are (c) in
src/commands/interaction/runtime/selector-is-visibility.test.ts, and the same-label disambiguation
read is (c) in selector-read-disambiguation.test.ts. Nothing imports the root
interaction-touch-runner helper any more, so it is deleted.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(daemon): delete the touch routing test the package copy replaces
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test: assert typed refusal details, count captures, and make the touch fake's drag and ref routes follow production
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(daemon): reuse the shared contextFromFlags in the touch runner and say which fake values are fake-supplied
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs(test): say that only selector reads capture in the touch fake
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>1 parent d000e71 commit 9c06cd2
33 files changed
Lines changed: 2381 additions & 2251 deletions
File tree
- packages
- contracts/src
- daemon
- src
- __tests__/support
- execution
- interaction/internal
- test-kit/src
- src
- __tests__/daemon-composition
- interaction
- commands/interaction/runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 59 | | |
64 | 60 | | |
65 | 61 | | |
| |||
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 67 | | |
76 | 68 | | |
77 | 69 | | |
| |||
196 | 188 | | |
197 | 189 | | |
198 | 190 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | 191 | | |
208 | 192 | | |
209 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
0 commit comments