Add tests on node multi-select (#1163)

This commit is contained in:
bymyself
2024-10-08 06:11:22 -07:00
committed by GitHub
parent 1ba236bbce
commit 62be958d47

View File

@@ -12,9 +12,19 @@ test.describe('Node Interaction', () => {
})
test.describe('Node Selection', () => {
test.afterEach(async ({ comfyPage }) => {
// Deselect all nodes
await comfyPage.clickEmptySpace()
const multiSelectModifiers = ['Control', 'Shift', 'Meta']
multiSelectModifiers.forEach((modifier) => {
test(`Can add multiple nodes to selection using ${modifier}+Click`, async ({
comfyPage
}) => {
const clipNodes = await comfyPage.getNodeRefsByType('CLIPTextEncode')
for (const node of clipNodes) {
await node.click('title', { modifiers: [modifier] })
}
const selectedNodeCount = await comfyPage.getSelectedGraphNodesCount()
expect(selectedNodeCount).toBe(clipNodes.length)
})
})
test('Can highlight selected', async ({ comfyPage }) => {