test(help): tie the selector command lists to the command surface

Merged
IM
5d ago
+84-11

Summary

Follow-up to the #5028 review notes.

  • Command lists: the "as the target" list in help selectors and selectors.md must equal the commands whose input has a selector field (click, press, fill, longpress, hover, get, is, wait). The other selector inputs are read through the CLI parser and readers, and both texts must name each one: find query, scroll --until, screenshot --crop-on, gesture pinch element, gesture drag source and destination. Any other input field described as a selector fails the test until it is listed.
  • checked example: the bare-key example is now role=switch checked, shown in both texts and pinned to role=switch plus checked=true. It replaces a bare checked that any text containing the word matched.
  • appname/windowtitle note: the help topic keeps the list of snapshots that report them. selectors.md points to agent-device help selectors, as commands.md does for exact behavior.

Validation

  • check:affected --run --head 04d307fef: format, lint, typecheck, layering, fallow, build and vitest-related pass. check:doc-links and check:doc-prose pass.
  • Against the #5028 topic and docs, only the role=switch checked row fails. The command-list tests pass there and guard later drift.
  • Mutants that each fail the new tests: hover dropped from the help list, wait dropped from the selectors.md list, gesture pinch dropped from selectors.md, screenshot --crop-on dropped from the help, the swipe from field described as a selector, the bare-key example reworded, and a bare key parsed as false.

Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.