mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
Backport of #10390 to `cloud/1.42` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10521-backport-cloud-1-42-fix-prune-stale-proxyWidgets-referencing-nodes-removed-by-nested--32e6d73d365081c0a6c0d41b45c67657) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Amp <amp@ampcode.com>
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
import {
|
|
comfyPageFixture as test,
|
|
comfyExpect as expect
|
|
} from '../fixtures/ComfyPage'
|
|
import { TestIds } from '../fixtures/selectors'
|
|
|
|
const WORKFLOW = 'subgraphs/nested-subgraph-stale-proxy-widgets'
|
|
|
|
/**
|
|
* Regression test for nested subgraph packing leaving stale proxyWidgets
|
|
* on the outer SubgraphNode.
|
|
*
|
|
* When two CLIPTextEncode nodes (ids 6, 7) inside the outer subgraph are
|
|
* packed into a nested subgraph (node 11), the outer SubgraphNode (id 10)
|
|
* must drop the now-stale ["7","text"] and ["6","text"] proxy entries.
|
|
* Only ["3","seed"] (KSampler) should remain.
|
|
*
|
|
* Stale entries render as "Disconnected" placeholder widgets (type "button").
|
|
*
|
|
* See: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10390
|
|
*/
|
|
test.describe(
|
|
'Nested subgraph stale proxyWidgets',
|
|
{ tag: ['@subgraph', '@widget'] },
|
|
() => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.settings.setSetting('Comfy.VueNodes.Enabled', true)
|
|
})
|
|
|
|
test('Outer subgraph node has no stale proxyWidgets after nested packing', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.workflow.loadWorkflow(WORKFLOW)
|
|
await comfyPage.vueNodes.waitForNodes()
|
|
|
|
const outerNode = comfyPage.vueNodes.getNodeLocator('10')
|
|
await expect(outerNode).toBeVisible()
|
|
|
|
const widgets = outerNode.getByTestId(TestIds.widgets.widget)
|
|
|
|
// Only the KSampler seed widget should be present — no stale
|
|
// "Disconnected" placeholders from the packed CLIPTextEncode nodes.
|
|
await expect(widgets).toHaveCount(1)
|
|
await expect(widgets.first()).toBeVisible()
|
|
|
|
// Verify the seed widget is present via its label
|
|
const seedWidget = outerNode.getByLabel('seed', { exact: true })
|
|
await expect(seedWidget).toBeVisible()
|
|
})
|
|
}
|
|
)
|