mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 13:59:54 +00:00
* Implement creating inputs by dragging link to widget * Update litegraph * Add playwright test * Update test expectations [skip ci] --------- Co-authored-by: huchenlei <huchenlei@proton.me> Co-authored-by: github-actions <github-actions@github.com>
23 lines
979 B
TypeScript
23 lines
979 B
TypeScript
import { expect } from '@playwright/test'
|
|
import { type NodeReference, comfyPageFixture as test } from './ComfyPage'
|
|
|
|
test.describe('Primitive Node', () => {
|
|
test('Can load with correct size', async ({ comfyPage }) => {
|
|
await comfyPage.loadWorkflow('primitive_node')
|
|
await expect(comfyPage.canvas).toHaveScreenshot('primitive_node.png')
|
|
})
|
|
|
|
// When link is dropped on widget, it should automatically convert the widget
|
|
// to input.
|
|
test('Can connect to widget', async ({ comfyPage }) => {
|
|
await comfyPage.loadWorkflow('primitive_node_unconnected')
|
|
const primitiveNode: NodeReference = await comfyPage.getNodeRefById(1)
|
|
const ksamplerNode: NodeReference = await comfyPage.getNodeRefById(2)
|
|
// Connect the output of the primitive node to the input of first widget of the ksampler node
|
|
await primitiveNode.connectWidget(0, ksamplerNode, 0)
|
|
await expect(comfyPage.canvas).toHaveScreenshot(
|
|
'primitive_node_connected.png'
|
|
)
|
|
})
|
|
})
|