Closed schroedermarc closed 1 year ago
I figured out my own issue. It might be helpful to others so I'll close it and leave a comment here. If you're using Playwright to simulate dragging you have to use the steps
parameter in the mouse.move
event. It defaults to 1 and that isn't enough.
I am trying to use Playwright to test several interactions in the Nebula/Deck based app I'm working on. I can successfully test click based interactions once I know the screen pixels of objects, but if we know an edit handle is at pixel (x,y) the recommended sequence of:
Does not produce the expected result.
Expected: The edit handle at (x,y) is moved to (x + dx, y + dy). Actual: The edit handle stays in the same location.
I can confirm that without the second move command, if a
mouse.up()
immediately followsmouse.down()
the click works as expected, so I've isolated it to the move event. However, reading the source code I'm wondering if there's some complexities with the mousemove event I'm not accounting for. In general I'd like a dependable way to test dragging features and edit handles with a testing suite like Playwright.