mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 15:10:06 +00:00
[bugfix] Fix flaky 'Can drag node' test by improving drag timing
The dragNode2 method was experiencing intermittent failures due to insufficient time for the drag animation to complete. This fix: - Adds more nextFrame() calls for proper timing synchronization - Uses mouse.move() with steps parameter for smoother drag animation - Ensures canvas has fully updated before screenshot comparison 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -684,7 +684,18 @@ export class ComfyPage {
|
||||
}
|
||||
|
||||
async dragNode2() {
|
||||
await this.dragAndDrop({ x: 622, y: 400 }, { x: 622, y: 300 })
|
||||
// Add more frames and smooth steps for reliable dragging
|
||||
await this.nextFrame()
|
||||
await this.page.mouse.move(622, 400)
|
||||
await this.nextFrame()
|
||||
await this.page.mouse.down()
|
||||
await this.nextFrame()
|
||||
// Use steps for smoother drag animation
|
||||
await this.page.mouse.move(622, 300, { steps: 10 })
|
||||
await this.nextFrame()
|
||||
await this.page.mouse.up()
|
||||
await this.nextFrame()
|
||||
// Extra frame to ensure canvas has finished updating
|
||||
await this.nextFrame()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user