Skip to content

Commit 968a1da

Browse files
huchenleichristian-byrnegithub-actions
authored
Add more litegraph change browser tests (#326)
* Add tests on litegraph batch disconnect shortcut (#323) * Add tests on right click node pin/unpin (#324) * Update test expectations [skip ci] --------- Co-authored-by: bymyself <[email protected]> Co-authored-by: github-actions <[email protected]>
1 parent a013d83 commit 968a1da

File tree

6 files changed

+49
-0
lines changed

6 files changed

+49
-0
lines changed

browser_tests/interaction.spec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,23 @@ test.describe('Node Interaction', () => {
8080
'batch_move_links_moved.png'
8181
)
8282
})
83+
84+
test('Can batch disconnect links with ctrl+alt+click', async ({
85+
comfyPage
86+
}) => {
87+
const loadCheckpointClipSlotPos = {
88+
x: 332,
89+
y: 508
90+
}
91+
await comfyPage.canvas.click({
92+
modifiers: ['Control', 'Alt'],
93+
position: loadCheckpointClipSlotPos
94+
})
95+
await comfyPage.nextFrame()
96+
await expect(comfyPage.canvas).toHaveScreenshot(
97+
'batch-disconnect-links-disconnected.png'
98+
)
99+
})
83100
})
84101

85102
test.describe('Canvas Interaction', () => {
90.3 KB
Loading

browser_tests/rightClickMenu.spec.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,36 @@ test.describe('Node Right Click Menu', () => {
8585
'right-click-node-widget-converted.png'
8686
)
8787
})
88+
89+
test('Can pin and unpin', async ({ comfyPage }) => {
90+
await comfyPage.rightClickEmptyLatentNode()
91+
await expect(comfyPage.canvas).toHaveScreenshot('right-click-node.png')
92+
await comfyPage.page.click('.litemenu-entry:has-text("Pin")')
93+
await comfyPage.nextFrame()
94+
await comfyPage.dragAndDrop({ x: 621, y: 617 }, { x: 16, y: 16 })
95+
await comfyPage.rightClickEmptyLatentNode()
96+
await expect(comfyPage.canvas).toHaveScreenshot(
97+
'right-click-pinned-node.png'
98+
)
99+
await comfyPage.page.click('.litemenu-entry:has-text("Unpin")')
100+
await comfyPage.nextFrame()
101+
await comfyPage.rightClickEmptyLatentNode()
102+
await expect(comfyPage.canvas).toHaveScreenshot(
103+
'right-click-unpinned-node.png'
104+
)
105+
})
106+
107+
test('Can move after unpin', async ({ comfyPage }) => {
108+
await comfyPage.rightClickEmptyLatentNode()
109+
await comfyPage.page.click('.litemenu-entry:has-text("Pin")')
110+
await comfyPage.nextFrame()
111+
await comfyPage.rightClickEmptyLatentNode()
112+
await comfyPage.page.click('.litemenu-entry:has-text("Unpin")')
113+
await comfyPage.nextFrame()
114+
await comfyPage.page.waitForTimeout(256)
115+
await comfyPage.dragAndDrop({ x: 496, y: 618 }, { x: 200, y: 590 })
116+
await expect(comfyPage.canvas).toHaveScreenshot(
117+
'right-click-unpinned-node-moved.png'
118+
)
119+
})
88120
})
106 KB
Loading
106 KB
Loading
96.1 KB
Loading

0 commit comments

Comments
 (0)