Skip to content

Commit 02b3b8e

Browse files
christian-byrnegithub-actions
andauthored
[test] add browser tests verifying Vue node groups behaviors (#5825)
## Summary Adds Playwright tests verifying node groups behaviors work in the Vue nodes system - in particular: - Using hotkey to create a group around selected Vue nodes - Using the "fit to contents" feature on a group that contains Vue nodes ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5825-test-add-browser-tests-verifying-Vue-node-groups-behaviors-27c6d73d365081e1a380ea5c43a861b0) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <[email protected]>
1 parent aa212be commit 02b3b8e

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import {
2+
comfyExpect as expect,
3+
comfyPageFixture as test
4+
} from '../../../fixtures/ComfyPage'
5+
6+
const CREATE_GROUP_HOTKEY = 'Control+g'
7+
8+
test.describe('Vue Node Groups', () => {
9+
test.beforeEach(async ({ comfyPage }) => {
10+
await comfyPage.setSetting('Comfy.VueNodes.Enabled', true)
11+
await comfyPage.vueNodes.waitForNodes()
12+
})
13+
14+
test('should allow creating groups with hotkey', async ({ comfyPage }) => {
15+
await comfyPage.page.getByText('Load Checkpoint').click()
16+
await comfyPage.page.getByText('KSampler').click({ modifiers: ['Control'] })
17+
await comfyPage.page.keyboard.press(CREATE_GROUP_HOTKEY)
18+
await expect(comfyPage.canvas).toHaveScreenshot(
19+
'vue-groups-create-group.png'
20+
)
21+
})
22+
23+
test('should allow fitting group to contents', async ({ comfyPage }) => {
24+
await comfyPage.setup()
25+
await comfyPage.loadWorkflow('groups/oversized_group')
26+
await comfyPage.ctrlA()
27+
await comfyPage.executeCommand('Comfy.Graph.FitGroupToContents')
28+
await comfyPage.nextFrame()
29+
await expect(comfyPage.canvas).toHaveScreenshot(
30+
'vue-groups-fit-to-contents.png'
31+
)
32+
})
33+
})
95.4 KB
Loading
50.5 KB
Loading

0 commit comments

Comments
 (0)