Skip to content

Commit 1c7f3e8

Browse files
Add test for cloning pinned node (#1753)
* Add test for cloning pinned node * Remove only * Update litegraph --------- Co-authored-by: huchenlei <huchenlei@proton.me>
1 parent 9ef4018 commit 1c7f3e8

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

browser_tests/rightClickMenu.spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,22 @@ test.describe('Node Right Click Menu', () => {
186186
'selected-nodes-unpinned.png'
187187
)
188188
})
189+
190+
test('Can clone pinned nodes', async ({ comfyPage }) => {
191+
const nodeCount = await comfyPage.getGraphNodesCount()
192+
const node = (await comfyPage.getFirstNodeRef())!
193+
await node.clickContextMenuOption('Pin')
194+
await comfyPage.nextFrame()
195+
await node.click('title', { button: 'right' })
196+
await expect(
197+
comfyPage.page.locator('.litemenu-entry:has-text("Unpin")')
198+
).toBeAttached()
199+
const cloneItem = comfyPage.page.locator(
200+
'.litemenu-entry:has-text("Clone")'
201+
)
202+
await cloneItem.click()
203+
await expect(cloneItem).toHaveCount(0)
204+
await comfyPage.nextFrame()
205+
expect(await comfyPage.getGraphNodesCount()).toBe(nodeCount + 1)
206+
})
189207
})

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"dependencies": {
8282
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
8383
"@comfyorg/comfyui-electron-types": "^0.3.19",
84-
"@comfyorg/litegraph": "^0.8.41",
84+
"@comfyorg/litegraph": "^0.8.42",
8585
"@primevue/themes": "^4.0.5",
8686
"@vueuse/core": "^11.0.0",
8787
"@xterm/addon-fit": "^0.10.0",

0 commit comments

Comments
 (0)