test(android): assert clear:true yields the empty-field keyevent sequence - #89
Conversation
…ence
The act `clear: true` path (act.ts:272-287) composes type('', '') →
pressKey('Control+a') → pressKey('Delete') → type(text) on the bound
Adapter. The existing test (act.test.ts:746-770) covers this against a
generic fake, so it never confirms the actual adb argv the android
adapter emits. The android adapter's pressKey('Control+a') becomes
`input keycombination KEYCODE_CTRL_LEFT KEYCODE_A` (commands.ts:268-278)
and pressKey('Delete') becomes `input keyevent KEYCODE_FORWARD_DEL`
(commands.ts:254-262 alias) — the keyevent sequence that actually
empties the field on the device.
Add a behavior test in android-adapter.behavior.test.ts that drives
the real AndroidAdapter through the four contract calls and asserts
the adb argv sequence on the FakeAdb transport, in order. No change
to android-adapter.ts. If the test ever fails, the failure is the
finding — fixing the keyevent sequence is a separate follow-up.
Dz-Task-Id: tsk_e45e4686c9e4c17eed6556c282bb98d1
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
✅ Reviewed — nothing blocking0 actionable comment(s) · grounded on your code ⏱ 1m 13s wall clock · 🤖 developerz.ai — automated review, running on your model and your box. |
There was a problem hiding this comment.
Review summary — 1 file(s), 0 finding(s).
Test-only PR adds a behavior test asserting the exact adb argv sequence for the act clear: true flow; the assertions match the adapter's real behavior (tap center of the 200×60 node → keycombination chord → FORWARD_DEL keyevent → re-focus tap + text). Clean.
No findings from: concern-tests.
🤖 developerz.ai review — automated, running on your model and your box. What is this?
Reviewed by zai/glm-5.3-flash on box Lucid Marten — 289.3k in / 2.54k out over 13 calls; cost unknown: no price on record for zai/glm-5.3-flash.
What
The act
clear: truepath (act.ts:272-287) composes type('', '') →pressKey('Control+a') → pressKey('Delete') → type(text) on the bound
Adapter. The existing test (act.test.ts:746-770) covers this against a
generic fake, so it never confirms the actual adb argv the android
adapter emits. The android adapter's pressKey('Control+a') becomes
input keycombination KEYCODE_CTRL_LEFT KEYCODE_A(commands.ts:268-278)and pressKey('Delete') becomes
input keyevent KEYCODE_FORWARD_DEL(commands.ts:254-262 alias) — the keyevent sequence that actually
empties the field on the device.
Add a behavior test in android-adapter.behavior.test.ts that drives
the real AndroidAdapter through the four contract calls and asserts
the adb argv sequence on the FakeAdb transport, in order. No change
to android-adapter.ts. If the test ever fails, the failure is the
finding — fixing the keyevent sequence is a separate follow-up.
Acceptance
input keycombination KEYCODE_CTRL_LEFT KEYCODE_Aandinput keyevent KEYCODE_FORWARD_DEL.bun test(default CI lane) — no env vars, no real device.Changes
src/adapters/android/android-adapter.behavior.test.ts(edit) — Add a behavior test that runs the actclear: trueflow through the real AndroidAdapter (type('', '') → pressKey('Control+a') → pressKey('Delete') → type(text)) against FakeAdb and asserts the adb argv sequence on the bound transport. Does NOT modify android-adapter.ts; uses the existing makeAdapter/makeNode/FakeAdb helpers; runs inbun testwith no env var. If the assertions fail, the failure surfaces verbatim — fixing the keyevent sequence is a separate follow-up.Verification
./bin/checkpassed (exit 0) in 21s.🤖 Opened by developerz.ai for task
tsk_e45e4686c9e4c17eed6556c282bb98d1on developerz-ai/ui-debugger-mcp.Raised automatically by the
raw_task_triagelane.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.