Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ async function moveNode(

await browser
.action('pointer')
.move({
x: Math.round(startPosition.x + nodeSize.width / 2),
y: Math.round(startPosition.y + nodeSize.height / 2),
})
.move({ origin: node, x: nodeSize.width / 2, y: nodeSize.height / 2 })
Copy link

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

The division operations nodeSize.width / 2 and nodeSize.height / 2 could result in fractional pixel values. Consider using Math.round() to ensure precise positioning, similar to the original implementation.

Suggested change
.move({ origin: node, x: nodeSize.width / 2, y: nodeSize.height / 2 })
.move({ origin: node, x: Math.round(nodeSize.width / 2), y: Math.round(nodeSize.height / 2) })

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copilot has a point here, I think I've seen errors before I added the rounding

.down({ button: 0 }) // Left mouse button
.move({ ...coordinates, duration: 1000, origin: 'pointer' })
.pause(1000)
Expand Down
Loading