Skip to content

feat: expose doubleTap(), longPress(), gesture() on Screen - #178

Merged
gmegidish merged 1 commit into
mainfrom
feat/screen-coordinate-gestures
Jun 12, 2026
Merged

gmegidish merged 1 commit into
mainfrom
feat/screen-coordinate-gestures

Conversation

@gmegidish

Copy link
Copy Markdown
Member

Exposes coordinate-based input methods that already existed in the driver but weren't reachable through the public Screen API:

  • screen.doubleTap(x, y)
  • screen.longPress(x, y, duration?)
  • screen.gesture(sequence) β€” multi-touch gesture sequences

Thin forwarders to the existing driver methods, mirroring screen.tap(). Adds screen.test.ts covering all three.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 23163ede-cee6-43b0-a3cf-5bfacde36de9

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a243d0c and cea0e5a.

πŸ“’ Files selected for processing (2)
  • packages/mobilewright-core/src/screen.test.ts
  • packages/mobilewright-core/src/screen.ts

Walkthrough

This pull request adds three coordinate-based gesture methods to the Screen class: doubleTap(x, y), longPress(x, y, duration?), and gesture(sequence). Each method forwards its arguments to the underlying driver. The implementation includes updated type imports for GestureSequence and a comprehensive test suite that verifies argument forwarding with a mocked driver, covering both default and explicit parameter cases.

πŸš₯ Pre-merge checks | βœ… 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (4 passed)
Check name Status Explanation
Title check βœ… Passed The title clearly and accurately summarizes the main change: exposing three gesture methods (doubleTap, longPress, gesture) on the Screen class.
Description check βœ… Passed The description is directly related to the changeset, providing context about the exposed methods and their purpose as forwarders to driver implementations.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/screen-coordinate-gestures

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

@gmegidish
gmegidish merged commit 8f3089e into main Jun 12, 2026
7 checks passed
@gmegidish
gmegidish deleted the feat/screen-coordinate-gestures branch June 12, 2026 11:34
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.

1 participant