fix(mobile): confirm the checked state after check() and uncheck(), and refuse uncheck on a radio
KA
14m ago+538+538+012345678901234567890123456789-11-11-01234567890123456789
What and why
- On a device,
check()anduncheck()tapped once and returned, so a tap the app ignored passed. Now they read the control again until it reports the new state, and fail withACTION_FAILEDat the timeout, as the web engine does. uncheck()on a checked radio used to tap it and pass with the radio still checked. Now it is refused before the tap, since only another radio in the group clears it.- The tap is never retried after it goes out: a second one would flip the control back.
Issue
Fixes #2041
Verified
Ran it locally: yes
e2e run tests/controls.e2e.ts --target ios-simulator, mobile benchmark Release build, iPhone 17 Pro, iOS 26.5: all 23 tests pass, including the new radio assertion.
Follow-up commits b421bde82, 93ad8846a, 901d21ef6, f13cafaae and f622c6591 (review fixes in confirmChecked, tests on fake timers, a sibling that moves into the tapped switch's bounds is not the control, a sibling that still stands where it did is not a mover) are covered by pnpm --filter @e2e-dev/mobile exec vitest run tests/unit/engine.test.ts (352 pass), tsc and oxlint. Reverting the stop rule, the unreadable-capture bound or the moved-sibling guard fails a test. I did not re-run the simulator suite after them.
| main | this branch |
|---|---|
medium.uncheck() resolves, Medium stays checked: expected undefined to be "ACTION_FAILED" | refused with ACTION_FAILED, Medium still checked, the suite passes |
Checklist
- Changeset added (
pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only. - Breaking change: title carries
!, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md). - Docs updated in the same PR: the
docs/**/*.mdxpage for the behavior, andskills/e2e/if the skill describes it. - Contract change: emitted
.d.tsreviewed,tests/types/sdk-types.tsupdated; wire change edits the schema and both fixtures. - Engine contract change (
e2e/engine): changesets fore2e,@e2e-dev/web, and@e2e-dev/mobile.