Skip to content

Commit 01b4ad0

Browse files
[test] add browser test for control+a selection of Vue nodes (#6031)
## Summary Adds test case ensuring you can select all Vue nodes with `Ctrl`+`a`, mirroring coverage of similar behavior when using Litegraph nodes. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6031-test-add-browser-test-for-control-a-selection-of-Vue-nodes-28a6d73d365081079860c3a083a946ef) by [Unito](https://www.unito.io)
1 parent 31c8538 commit 01b4ad0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

browser_tests/tests/vueNodes/interactions/node/select.spec.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,23 @@ test.describe('Vue Node Selection', () => {
5050
})
5151
}
5252

53+
test('should select all nodes with ctrl+a', async ({ comfyPage }) => {
54+
const initialCount = await comfyPage.vueNodes.getNodeCount()
55+
expect(initialCount).toBeGreaterThan(0)
56+
57+
await comfyPage.canvas.press('Control+a')
58+
59+
const selectedCount = await comfyPage.vueNodes.getSelectedNodeCount()
60+
expect(selectedCount).toBe(initialCount)
61+
})
62+
5363
test('should select pinned node without dragging', async ({ comfyPage }) => {
5464
const PIN_HOTKEY = 'p'
5565
const PIN_INDICATOR = '[data-testid="node-pin-indicator"]'
5666

57-
// Select a node by clicking its title
5867
const checkpointNodeHeader = comfyPage.page.getByText('Load Checkpoint')
5968
await checkpointNodeHeader.click()
6069

61-
// Pin it using the hotkey (as a user would)
6270
await comfyPage.page.keyboard.press(PIN_HOTKEY)
6371

6472
const checkpointNode = comfyPage.vueNodes.getNodeByTitle('Load Checkpoint')

0 commit comments

Comments
 (0)