From d5d7f5e33db5e74dc341a02764e5583f38e2c4fd Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Sun, 25 Oct 2026 13:44:40 -0700 Subject: [PATCH] test(nodes): PromptSearchList text takes a dragged link like a core widget --- tests/comfyui/text-link.spec.mjs | 21 +++++++++++++++++++++ tests/vendor/comfyui-config.test.mjs | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/tests/comfyui/text-link.spec.mjs b/tests/comfyui/text-link.spec.mjs index 7bcfe2f7..114e5637 100644 --- a/tests/comfyui/text-link.spec.mjs +++ b/tests/comfyui/text-link.spec.mjs @@ -140,6 +140,27 @@ for (const type of ['PromptManagerFocused', 'PromptManagerSplit', 'PromptManager }); } +test('PromptSearchList text is a core widget socket and takes a dragged STRING link too', async ({ page }) => { + const { id, sources } = await page.evaluate(async () => { + const { app } = await import('/scripts/app.js'); + const node = LiteGraph.createNode('PromptSearchList'); + app.graph.add(node); + node.pos = [500, 80]; + const source = LiteGraph.createNode('PrimitiveString'); + app.graph.add(source); + source.pos = [40, 80]; + app.canvas.ds.scale = .8; + app.canvas.ds.offset = [40, 40]; + app.canvas.setDirty(true, true); + return { id: node.id, sources: [source.id] }; + }); + // A core widget's socket shows while a link is dragged; aim at where the frontend places it. + await expect.poll(async () => Boolean(await slotPosition(page, id, 'in', 'text'))).toBe(true); + await drag(page, await slotPosition(page, sources[0], 'out', 0), await slotPosition(page, id, 'in', 'text')); + await expect.poll(() => linkedInputs(page, id)).toEqual(['text']); + expect((await queued(page, id)).text).toEqual([String(sources[0]), 0]); +}); + test('workflows saved before #343 load unchanged and their linked text keeps working', async ({ page }) => { const workflow = JSON.parse(await readFile(new URL('./fixtures/workflow-before-343.json', import.meta.url), 'utf8')); const result = await page.evaluate(async workflow => { diff --git a/tests/vendor/comfyui-config.test.mjs b/tests/vendor/comfyui-config.test.mjs index 6ee2cd98..8b9bd6b7 100644 --- a/tests/vendor/comfyui-config.test.mjs +++ b/tests/vendor/comfyui-config.test.mjs @@ -23,8 +23,8 @@ test('execution script discovers only the new matrix and preserves all 78 origin env: { ...process.env, PM_COMFY_ROOT: '/unused-pinned-checkout' } }); const stock = list('tools/vendor/comfyui.config.mjs'); // + local Inspect host case (inspect-sender.spec.mjs, 2 projects), + the S10 renderer case (prompt-bridge.spec.mjs, 2 projects) - // + #343 linked text: five node types and the pre-#343 workflow (text-link.spec.mjs, 2 projects) - assert.match(stock, /Total: 96 tests in 9 files/); + // + #343 linked text: five node types, PromptSearchList and the pre-#343 workflow (text-link.spec.mjs, 2 projects) + assert.match(stock, /Total: 98 tests in 9 files/); assert.doesNotMatch(stock, /execution-history/); assert.doesNotMatch(stock, /execution-outputs/); assert.doesNotMatch(stock, /library-location/); // it starts its own fresh host (#249 S6b)