Skip to content

test: lock find click JSON response to exact deterministic key set#183

Merged
thymikee merged 1 commit intomainfrom
test/find-click-strict-key-set
Mar 3, 2026
Merged

test: lock find click JSON response to exact deterministic key set#183
thymikee merged 1 commit intomainfrom
test/find-click-strict-key-set

Conversation

@thymikee
Copy link
Copy Markdown
Contributor

@thymikee thymikee commented Mar 3, 2026

Summary

  • Add strict key-set assertions (deepEqual on sorted Object.keys) to all find click handler tests so they fail if any key is added, removed, or renamed in the success payload
  • Add a new test covering the fallback coordinate path where the resolved hittable ancestor lacks a rect (response must contain exactly ref, locator, query — no x/y)
  • Strengthen the existing "explicit label locator" test with the same strict key-set check
  • Remove unused DaemonResponse import

Test plan

  • pnpm test:unit passes (541/541)
  • Tests fail if any key is added/removed/renamed in find click success payload
  • No platform-specific fields leak into response

Closes #182

🤖 Generated with Claude Code

Add strict key-set assertions to find click handler tests to prevent
accidental schema drift in the machine-consumed JSON response.

Closes #182

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-183/

Built to branch gh-pages at 2026-03-03 19:22 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@thymikee thymikee merged commit e248c87 into main Mar 3, 2026
6 checks passed
@thymikee thymikee deleted the test/find-click-strict-key-set branch March 3, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: lock find click JSON response to exact deterministic key set

1 participant