mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 07:00:23 +00:00
## 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 <github-actions@github.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import {
|
|
comfyExpect as expect,
|
|
comfyPageFixture as test
|
|
} from '../../../fixtures/ComfyPage'
|
|
|
|
const CREATE_GROUP_HOTKEY = 'Control+g'
|
|
|
|
test.describe('Vue Node Groups', () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.setSetting('Comfy.VueNodes.Enabled', true)
|
|
await comfyPage.vueNodes.waitForNodes()
|
|
})
|
|
|
|
test('should allow creating groups with hotkey', async ({ comfyPage }) => {
|
|
await comfyPage.page.getByText('Load Checkpoint').click()
|
|
await comfyPage.page.getByText('KSampler').click({ modifiers: ['Control'] })
|
|
await comfyPage.page.keyboard.press(CREATE_GROUP_HOTKEY)
|
|
await expect(comfyPage.canvas).toHaveScreenshot(
|
|
'vue-groups-create-group.png'
|
|
)
|
|
})
|
|
|
|
test('should allow fitting group to contents', async ({ comfyPage }) => {
|
|
await comfyPage.setup()
|
|
await comfyPage.loadWorkflow('groups/oversized_group')
|
|
await comfyPage.ctrlA()
|
|
await comfyPage.executeCommand('Comfy.Graph.FitGroupToContents')
|
|
await comfyPage.nextFrame()
|
|
await expect(comfyPage.canvas).toHaveScreenshot(
|
|
'vue-groups-fit-to-contents.png'
|
|
)
|
|
})
|
|
})
|