Skip to content

test(android): assert clear:true yields the empty-field keyevent sequence - #89

Merged
developerz-ai[bot] merged 1 commit into
mainfrom
dz/task-tsk_e45e4686c9e4c17eed6556c282bb98d1
Sep 22, 2026
Merged

developerz-ai[bot] merged 1 commit into
mainfrom
dz/task-tsk_e45e4686c9e4c17eed6556c282bb98d1

Conversation

@developerz-ai

@developerz-ai developerz-ai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

What

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.

Acceptance

  • A test in android-adapter.behavior.test.ts drives the real AndroidAdapter through type→pressKey('Control+a')→pressKey('Delete')→type and asserts the FakeAdb argv order, including input keycombination KEYCODE_CTRL_LEFT KEYCODE_A and input keyevent KEYCODE_FORWARD_DEL.
  • Runs in bun test (default CI lane) — no env vars, no real device.
  • android-adapter.ts is unchanged.
  • A failing assertion surfaces verbatim — the test does not silently swap the keyevent sequence.

Changes

  • src/adapters/android/android-adapter.behavior.test.ts (edit) — Add a behavior test that runs the act clear: true flow 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 in bun test with no env var. If the assertions fail, the failure surfaces verbatim — fixing the keyevent sequence is a separate follow-up.

Verification

./bin/check passed (exit 0) in 21s.


🤖 Opened by developerz.ai for task tsk_e45e4686c9e4c17eed6556c282bb98d1 on developerz-ai/ui-debugger-mcp.

Raised automatically by the raw_task_triage lane.

🤖 developerz.ai maintainer bot — this PR is one slice of a stacked plan.
Dispatched automatically by the raw_task_triage lane
Model MiniMax-M3 on router.ai.developerz.ai via native, funded by box_env
Ran on box sebby-ovh-3
Cost unknown: no list price on record for MiniMax-M3 on router.ai.developerz.ai
Run timeline run_3dd1b18566594e8dbce260badfb0dc9d
Part 1/1 of plan rtk_d5c0ff2efe864898b25b0c2e4f5f2e89


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…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
@developerz-ai developerz-ai Bot added dz/fleet-pr Opened by the developerz.ai maintainer bot from a fleet run. dz/model:MiniMax-M3 developerz.ai: model that wrote this bot PR. dz/provider:router.ai.developerz.ai developerz.ai: provider that served this bot PR. labels Sep 22, 2026
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: de4b975f-3c5b-4d0c-bc96-1de81efb1b2b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@developerz-ai

developerz-ai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Reviewed — nothing blocking

0 actionable comment(s) · grounded on your code

⏱ 1m 13s wall clock · glm-5.3-flash via zai · 13 model call(s) · 2,536 output token(s) · 15 tok/s observed (slowest call 32s)

🤖 developerz.ai — automated review, running on your model and your box.

@developerz-ai developerz-ai Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@developerz-ai
developerz-ai Bot merged commit 34df0ee into main Sep 22, 2026
3 checks passed
@developerz-ai
developerz-ai Bot deleted the dz/task-tsk_e45e4686c9e4c17eed6556c282bb98d1 branch September 22, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dz/fleet-pr Opened by the developerz.ai maintainer bot from a fleet run. dz/model:MiniMax-M3 developerz.ai: model that wrote this bot PR. dz/provider:router.ai.developerz.ai developerz.ai: provider that served this bot PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants