test(help): tie the selector command lists to the command surface
Merged
IM
5d ago+84+84+01234567890123456789-11-11-01234567890123456789
Summary
Follow-up to the #5028 review notes.
- Command lists: the "as the target" list in
help selectorsand selectors.md must equal the commands whose input has aselectorfield (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: findquery,scroll --until,screenshot --crop-on, gesture pinchelement, gesture dragsourceanddestination. Any other input field described as a selector fails the test until it is listed. checkedexample: the bare-key example is nowrole=switch checked, shown in both texts and pinned torole=switchpluschecked=true. It replaces a barecheckedthat 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-linksandcheck:doc-prosepass.- Against the #5028 topic and docs, only the
role=switch checkedrow fails. The command-list tests pass there and guard later drift. - Mutants that each fail the new tests:
hoverdropped from the help list,waitdropped from the selectors.md list,gesture pinchdropped from selectors.md,screenshot --crop-ondropped from the help, the swipefromfield described as a selector, the bare-key example reworded, and a bare key parsed asfalse.

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