Repository navigation
test(daemon): fold the touch-forwarding command-surface fake into the touch fake - #3708
Conversation
… touch command-surface fake One fake serves every touch suite: createTouchCommandSurface takes matchSelector, observeSettle and members, resolves a ref against the authorized frame first, stores each selector capture as the session snapshot, and refuses a miss with the typed ref_not_found / selector_not_found reason. No assertion changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
|
This PR is ready at 6823a2e, and all 16 checks pass. The change only touches test support, so no production route overlaps. There are no conflicts, and nothing else needs to happen before merge. Not blocking: the default matchSelector in touch-command-surface-fake.ts now uses the touch fake's " || " key=value grammar instead of the old label=/id= grammar. It accepts the same single-term selectors, and I found no forwarding caller that reads differently, so you can take this or leave it. I did not run the 149-test parity run or the mutation break-proofs myself. I also did not read every line of the new touchInteractions body, and I did not scan the 15 other callers already on the touch fake for the new refusal behavior. |
|
Summary
Follow-up to #3698's review note: the daemon package had two touch command-surface fakes.
touch-forwarding-surface-fake.tsis folded intotouch-command-surface-fake.ts, which now serves every touch suite throughcreateTouchCommandSurface(options);touchCreateCommandSurfaceiscreateTouchCommandSurface().What the folded fake takes from the forwarding one:
observeSettleandmembersoptions (amatchSelectoroption, defaulting to the||key=value grammar);@refresolves against the authorized ref frame before the latest observation;captureAndStoreSnapshot);ref_not_found/selector_not_foundreason anddispatched: 'no';click/fill) for press and fill.No test file changes beyond the import and identifier rename (
git diff origin/main -- '*.test.ts'shows only those lines), so no assertion changed and none was dropped.Evidence
observeSettlefails 7 tests (interaction-settle*); dropping the ref-frame preference fails 3 (interaction-common,selector-runtime-get-reads,interaction-touch-android-freshness); dropping the typed selector refusal fails 2 (interaction-capture-disclosure,interaction-touch-android-freshness).check:quick,check:layering(no new R83/R84 entries),check:fallowandcheck:gate-manifestpass.vi.mockis added or changed; no packageexportschange; no barrels.🤖 Generated with Claude Code