Skip to content

Commit 8630b27

Browse files
Fix unstable test. Remove test on unimplemented feature
1 parent 1b311ad commit 8630b27

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

browser_tests/interaction.spec.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,26 @@ test.describe('Node Interaction', () => {
2525
await expect(comfyPage.canvas).toHaveScreenshot('selected-node2.png')
2626
})
2727

28-
test('Can select multiple nodes with Meta+Click (mac)', async ({
29-
comfyPage
30-
}) => {
31-
const clipNodes = await comfyPage.getNodeRefsByType('CLIPTextEncode')
32-
for (const node of clipNodes) {
33-
await node.click('title', { modifiers: ['Meta'] })
34-
}
35-
const selectedNodeCount = await comfyPage.getSelectedGraphNodesCount()
36-
expect(selectedNodeCount).toBe(clipNodes.length)
37-
})
38-
3928
test('Can drag-select nodes with Meta (mac)', async ({ comfyPage }) => {
4029
const clipNodes = await comfyPage.getNodeRefsByType('CLIPTextEncode')
41-
const { x, y } = await clipNodes[0].getPosition()
30+
const clipNode1Pos = await clipNodes[0].getPosition()
31+
const clipNode2Pos = await clipNodes[1].getPosition()
4232
const offset = 64
4333
await comfyPage.page.keyboard.down('Meta')
4434
await comfyPage.dragAndDrop(
45-
{ x: x - offset, y: y - offset },
46-
{ x: x + offset, y: y + offset }
35+
{
36+
x: Math.min(clipNode1Pos.x, clipNode2Pos.x) - offset,
37+
y: Math.min(clipNode1Pos.y, clipNode2Pos.y) - offset
38+
},
39+
{
40+
x: Math.max(clipNode1Pos.x, clipNode2Pos.x) + offset,
41+
y: Math.max(clipNode1Pos.y, clipNode2Pos.y) + offset
42+
}
4743
)
4844
await comfyPage.page.keyboard.up('Meta')
49-
expect(await comfyPage.getSelectedGraphNodesCount()).toBe(1)
45+
expect(await comfyPage.getSelectedGraphNodesCount()).toBe(
46+
clipNodes.length
47+
)
5048
})
5149
})
5250

0 commit comments

Comments
 (0)