Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

The mouseUp parameter in dragAndDropThought was confusing. Renamed to dragOnly with inverted logic and changed default behavior to complete the drop operation.

Changes:

  • Renamed parameter mouseUpdragOnly with inverted boolean logic
  • Changed default behavior: now releases mouse button by default (was opt-in)
  • Updated logic: if (!dragOnly) releases mouse instead of if (mouseUp)
  • Updated all test callsites to use new parameter

Before:

// Had to explicitly pass mouseUp: true to complete drop
await dragAndDropThought('a', 'b', { position: 'after', mouseUp: true })

// Default behavior didn't release mouse
await dragAndDropThought('a', 'b', { position: 'after' })

After:

// Default completes the drop
await dragAndDropThought('a', 'b', { position: 'after' })

// Explicit dragOnly for drag-without-release
await dragAndDropThought('a', null, { position: 'none', dragOnly: true })
Original prompt

This section details on the original issue you should resolve

<issue_title>dragAndHoldThought puppeteer helper</issue_title>
<issue_description>- [x] Blocked by #3016

The mouseUp parameter is a bit confusing.

/src/e2e/puppeteer/helpers/dragAndDropThought.ts

Let's split this into two helper functions to make this clear:

  • dragAndDropThought - Default to calling mouse.up(). Change param to dragOnly?: boolean since params should default to falsey.</issue_description>

Comments on the Issue (you are @copilot in this section)

@raineorshine Decided to go a different direction on this. I don't want to add another helper function that reads so similarly. Maybe changing the param name from `mouseUp` to `dragOnly` would be better.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update dragAndDropThought parameter for clarity Rename dragAndDropThought mouseUp param to dragOnly with inverted logic Nov 6, 2025
Copilot AI requested a review from raineorshine November 6, 2025 00:52
@raineorshine
Copy link
Contributor

Puppeteer tests are failing

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.

dragAndDropThought: Rename and invert mouseUp → dragOnly

2 participants