[Bug] Register dom widget when only node is added to graph (#3732)

This commit is contained in:
Chenlei Hu
2025-05-02 12:49:19 -04:00
committed by filtered
parent 1071242359
commit 2ac6159939
3 changed files with 31 additions and 2 deletions

View File

@@ -31,4 +31,20 @@ test.describe('DOM Widget', () => {
await comfyPage.nextFrame()
await expect(comfyPage.canvas).toHaveScreenshot('focus-mode-on.png')
})
// No DOM widget should be created by creation of interim LGraphNode objects.
test('Copy node with DOM widget by dragging + alt', async ({ comfyPage }) => {
const initialCount = await comfyPage.getDOMWidgetCount()
// TextEncodeNode1
await comfyPage.page.mouse.move(618, 191)
await comfyPage.page.keyboard.down('Alt')
await comfyPage.page.mouse.down()
await comfyPage.page.mouse.move(100, 100)
await comfyPage.page.mouse.up()
await comfyPage.page.keyboard.up('Alt')
const finalCount = await comfyPage.getDOMWidgetCount()
expect(finalCount).toBe(initialCount + 1)
})
})