mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-01 11:42:06 +00:00
Fix ('STRING',) input node (#1457)
* Fix ('STRING',) input node
* Update test expectations [skip ci]
---------
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
42
browser_tests/assets/string_input.json
Normal file
42
browser_tests/assets/string_input.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"last_node_id": 1,
|
||||
"last_link_id": 0,
|
||||
"nodes": [
|
||||
{
|
||||
"id": 1,
|
||||
"type": "DevToolsNodeWithStringInput",
|
||||
"pos": [
|
||||
15,
|
||||
48
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"properties": {
|
||||
"Node name for S&R": "DevToolsNodeWithStringInput"
|
||||
},
|
||||
"widgets_values": [
|
||||
""
|
||||
]
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"groups": [],
|
||||
"config": {},
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 1,
|
||||
"offset": [
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
@@ -527,6 +527,13 @@ test.describe('Load workflow', () => {
|
||||
await comfyPage.loadWorkflow('string_node_id')
|
||||
await expect(comfyPage.canvas).toHaveScreenshot('string_node_id.png')
|
||||
})
|
||||
|
||||
test('Can load workflow with ("STRING",) input node', async ({
|
||||
comfyPage
|
||||
}) => {
|
||||
await comfyPage.loadWorkflow('string_input')
|
||||
await expect(comfyPage.canvas).toHaveScreenshot('string_input.png')
|
||||
})
|
||||
})
|
||||
|
||||
test.describe('Load duplicate workflow', () => {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
@@ -25,7 +25,7 @@ import { ComfyNodeDef, StatusWsMessageStatus } from '@/types/apiTypes'
|
||||
import { adjustColor, ColorAdjustOptions } from '@/utils/colorUtil'
|
||||
import { ComfyAppMenu } from './ui/menu/index'
|
||||
import { getStorageValue } from './utils'
|
||||
import { ComfyWorkflow, useWorkflowStore } from '@/stores/workflowStore'
|
||||
import { ComfyWorkflow } from '@/stores/workflowStore'
|
||||
import {
|
||||
LGraphCanvas,
|
||||
LGraph,
|
||||
@@ -1976,8 +1976,11 @@ export class ComfyApp {
|
||||
widget?: IBaseWidget
|
||||
} = { minWidth: 1, minHeight: 1 }
|
||||
for (const inputName in inputs) {
|
||||
const inputData = inputs[inputName]
|
||||
const type = inputData[0]
|
||||
const _inputData = inputs[inputName]
|
||||
const type = _inputData[0]
|
||||
const options = _inputData[1] ?? {}
|
||||
const inputData = [type, options]
|
||||
|
||||
const inputIsRequired = requiredInputs && inputName in requiredInputs
|
||||
|
||||
let widgetCreated = true
|
||||
|
||||
Reference in New Issue
Block a user