mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 05:49:54 +00:00
Attempts to fix flakiness when groups are enabled on the minimap and the screenshot is taken too early, before the render completes. See [comment](https://github.com/Comfy-Org/ComfyUI_frontend/pull/5942#issuecomment-3374615335) for more context. May or may not solve the flakiness. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5962-wait-for-frame-on-group-creation-test-2856d73d365081f6a059ebfc5a03857c) by [Unito](https://www.unito.io)
36 lines
1.2 KiB
TypeScript
36 lines
1.2 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.setSetting('Comfy.Minimap.ShowGroups', 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 comfyPage.nextFrame()
|
|
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'
|
|
)
|
|
})
|
|
})
|