mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 06:47:33 +00:00
Fix test cases
Turns out the vuedraggable import has side effects that break other test cases. This is awful and requires further investigation, but for now, the import is performed at execution time
This commit is contained in:
@@ -46,7 +46,7 @@ function onClick() {
|
||||
padding: 4px 16px 4px 0;
|
||||
word-break: break-all;
|
||||
border-radius: 4px;
|
||||
background: var(--bg-color, #202020);
|
||||
background: var(--p-dialog-background, #202020);
|
||||
}
|
||||
.widget-node {
|
||||
color: var(--color-slate-100, #9c9eab);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import SubgraphNode from '@/components/selectionbar/SubgraphNode.vue'
|
||||
import { type DialogComponentProps, useDialogStore } from '@/stores/dialogStore'
|
||||
|
||||
const key = 'global-subgraph-node-config'
|
||||
@@ -11,11 +10,15 @@ export function showSubgraphNodeDialog() {
|
||||
closable: false,
|
||||
position: 'right'
|
||||
}
|
||||
|
||||
dialogStore.showDialog({
|
||||
title: 'Parameters',
|
||||
key,
|
||||
component: SubgraphNode,
|
||||
dialogComponentProps
|
||||
})
|
||||
//FIXME: the vuedraggable import has unknown sideffects that break tests.
|
||||
void import('@/components/selectionbar/SubgraphNode.vue').then(
|
||||
(SubgraphNode) => {
|
||||
dialogStore.showDialog({
|
||||
title: 'Parameters',
|
||||
key,
|
||||
component: SubgraphNode,
|
||||
dialogComponentProps
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -134,6 +134,7 @@ LiteGraphGlobal {
|
||||
"WIDGET_BGCOLOR": "#222",
|
||||
"WIDGET_DISABLED_TEXT_COLOR": "#666",
|
||||
"WIDGET_OUTLINE_COLOR": "#666",
|
||||
"WIDGET_PROMOTED_OUTLINE_COLOR": "#BF00FF",
|
||||
"WIDGET_SECONDARY_TEXT_COLOR": "#999",
|
||||
"WIDGET_TEXT_COLOR": "#DDD",
|
||||
"allow_multi_output_for_events": true,
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
import { describe, expect, test, vi } from 'vitest'
|
||||
|
||||
import '@/core/graph/subgraph/proxyWidget'
|
||||
//import { ComponentWidgetImpl, DOMWidgetImpl } from '@/scripts/domWidget'
|
||||
|
||||
import { LGraphNode, type SubgraphNode } from '@/lib/litegraph/src/litegraph'
|
||||
import { registerProxyWidgets } from '@/core/graph/subgraph/proxyWidget'
|
||||
import {
|
||||
type LGraphCanvas,
|
||||
LGraphNode,
|
||||
type SubgraphNode
|
||||
} from '@/lib/litegraph/src/litegraph'
|
||||
|
||||
import {
|
||||
createTestSubgraph,
|
||||
createTestSubgraphNode
|
||||
} from '../litegraph/subgraph/fixtures/subgraphHelpers'
|
||||
|
||||
registerProxyWidgets({
|
||||
canvas: { addEventListener() {} }
|
||||
} as unknown as LGraphCanvas)
|
||||
|
||||
vi.mock('@/renderer/core/canvas/canvasStore', () => ({
|
||||
useCanvasStore: () => ({})
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user