Skip to content

GAUD-10602 - Enhance drag command so the consumer can pick whether the drag is completed - #1089

Merged
svanherk merged 2 commits into
mainfrom
GAUD-10602-enhance-drag-to-not-drop
Sep 17, 2026
Merged

svanherk merged 2 commits into
mainfrom
GAUD-10602-enhance-drag-to-not-drop

Conversation

@svanherk

Copy link
Copy Markdown
Contributor

This PR:

  • Adds the ability to not complete the drag, which is needed for vdiffs to see the state of closing or opening a panel by dragging
  • Makes sure that the mouse pointer is reset to "up" at the end of each test (especially now that we have a helper that specifically leaves it down)

Comment thread src/browser/reset.js
if (shouldResetMouse) {
shouldResetMouse = false;
await sendMouse({ type: 'move', position: [0, 0] }).catch(() => {});
await sendMouse({ type: 'move', position: [0, 0] });

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.

From what I can tell, the catch here was added for manual mode. We have removed that mode, and I didn't see any issues when using open.

Comment thread src/browser/reset.js
@@ -74,7 +74,8 @@ export async function reset(opts = {}) {

if (shouldResetMouse) {

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.

web-test-runner has a resetMouse command that ideally we would be using. But it doesn't work in --open mode for Chrome at all, because the reset opens up the context menu. Issue is here, and more info in this comment.

@svanherk
svanherk marked this pull request as ready for review September 17, 2026 15:07
@svanherk
svanherk requested a review from a team as a code owner September 17, 2026 15:07

@dlockhart dlockhart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@svanherk
svanherk merged commit fd2feeb into main Sep 17, 2026
7 checks passed
@svanherk
svanherk deleted the GAUD-10602-enhance-drag-to-not-drop branch September 17, 2026 19:46
@d2l-github-release-tokens

Copy link
Copy Markdown

🎉 This PR is included in version 1.53.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants