mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
[Test] Add test on moving output links (#887)
Ref: https://github.com/Comfy-Org/litegraph.js/issues/881 Verifies that moving output links does not cause link corruption.
This commit is contained in:
@@ -111,11 +111,13 @@ const test = baseTest.extend<TestContext>({
|
||||
for (const input of node.inputs) {
|
||||
if (input.link) {
|
||||
expect(graph.links.keys()).toContain(input.link)
|
||||
expect(graph.links.get(input.link)?.target_id).toBe(node.id)
|
||||
}
|
||||
}
|
||||
for (const output of node.outputs) {
|
||||
for (const linkId of output.links ?? []) {
|
||||
expect(graph.links.keys()).toContain(linkId)
|
||||
expect(graph.links.get(linkId)?.origin_id).toBe(node.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -330,6 +332,7 @@ describe("LinkConnector Integration", () => {
|
||||
expect(connector.outputLinks.length).toBe(0)
|
||||
|
||||
expect(disconnectedNode.outputs[0].links).toEqual(nextLinkIds)
|
||||
expect(hasOutputNode.outputs[0].links).toEqual([])
|
||||
|
||||
const reroutesAfter = disconnectedNode.outputs[0].links
|
||||
?.map(linkId => graph.links.get(linkId)!)
|
||||
|
||||
Reference in New Issue
Block a user