From 1c7f3e865a314a0244d56572239a59183f18fda5 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Mon, 2 Dec 2024 03:38:09 +0000 Subject: [PATCH] Add test for cloning pinned node (#1753) * Add test for cloning pinned node * Remove only * Update litegraph --------- Co-authored-by: huchenlei --- browser_tests/rightClickMenu.spec.ts | 18 ++++++++++++++++++ package-lock.json | 8 ++++---- package.json | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/browser_tests/rightClickMenu.spec.ts b/browser_tests/rightClickMenu.spec.ts index 15c64c0f0..901bd6bf2 100644 --- a/browser_tests/rightClickMenu.spec.ts +++ b/browser_tests/rightClickMenu.spec.ts @@ -186,4 +186,22 @@ test.describe('Node Right Click Menu', () => { 'selected-nodes-unpinned.png' ) }) + + test('Can clone pinned nodes', async ({ comfyPage }) => { + const nodeCount = await comfyPage.getGraphNodesCount() + const node = (await comfyPage.getFirstNodeRef())! + await node.clickContextMenuOption('Pin') + await comfyPage.nextFrame() + await node.click('title', { button: 'right' }) + await expect( + comfyPage.page.locator('.litemenu-entry:has-text("Unpin")') + ).toBeAttached() + const cloneItem = comfyPage.page.locator( + '.litemenu-entry:has-text("Clone")' + ) + await cloneItem.click() + await expect(cloneItem).toHaveCount(0) + await comfyPage.nextFrame() + expect(await comfyPage.getGraphNodesCount()).toBe(nodeCount + 1) + }) }) diff --git a/package-lock.json b/package-lock.json index 61d4a05b9..c37f474f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@atlaskit/pragmatic-drag-and-drop": "^1.3.1", "@comfyorg/comfyui-electron-types": "^0.3.19", - "@comfyorg/litegraph": "^0.8.41", + "@comfyorg/litegraph": "^0.8.42", "@primevue/themes": "^4.0.5", "@vueuse/core": "^11.0.0", "@xterm/addon-fit": "^0.10.0", @@ -1957,9 +1957,9 @@ "license": "GPL-3.0-only" }, "node_modules/@comfyorg/litegraph": { - "version": "0.8.41", - "resolved": "https://registry.npmjs.org/@comfyorg/litegraph/-/litegraph-0.8.41.tgz", - "integrity": "sha512-QSx61Cu1WPaQUraa1g087JLhDBB7QHc7+2w5rY+tyJ5ZQK+rbdgXFE5blFk6iZ7ud9DnT15Gh6NjxFNxslWnig==", + "version": "0.8.42", + "resolved": "https://registry.npmjs.org/@comfyorg/litegraph/-/litegraph-0.8.42.tgz", + "integrity": "sha512-O0c0hOJsT2MZ7H+7VLKKTXYZ5f9mCscnQ6UhQ0HU0o3hteSqalJsS6n68j+DboBU2Vogp/wf73LSszEzNiX1sg==", "license": "MIT" }, "node_modules/@cspotcode/source-map-support": { diff --git a/package.json b/package.json index 867e2c2f7..2d94c8c59 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "dependencies": { "@atlaskit/pragmatic-drag-and-drop": "^1.3.1", "@comfyorg/comfyui-electron-types": "^0.3.19", - "@comfyorg/litegraph": "^0.8.41", + "@comfyorg/litegraph": "^0.8.42", "@primevue/themes": "^4.0.5", "@vueuse/core": "^11.0.0", "@xterm/addon-fit": "^0.10.0",