mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-01 11:10:00 +00:00
- Remove comfyPageFixture re-export from ComfyPage.ts - Update all test imports to use comfyPageFixture from its own file - Update README.md example to show correct import path - Fixes: comfyPageFixture → LocalhostComfyPage → ComfyPage circular import
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import {
|
|
comfyExpect as expect,
|
|
comfyPageFixture as test
|
|
} from '../../../fixtures/comfyPageFixture'
|
|
|
|
const ERROR_CLASS = /border-node-stroke-error/
|
|
|
|
test.describe('Vue Node Error', () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.setSetting('Comfy.VueNodes.Enabled', true)
|
|
await comfyPage.vueNodes.waitForNodes()
|
|
})
|
|
|
|
test('should display error state when node is missing (node from workflow is not installed)', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.setup()
|
|
await comfyPage.loadWorkflow('missing/missing_nodes')
|
|
|
|
// Expect error state on missing unknown node
|
|
const unknownNode = comfyPage.page.locator('[data-node-id]').filter({
|
|
hasText: 'UNKNOWN NODE'
|
|
})
|
|
await expect(unknownNode).toHaveClass(ERROR_CLASS)
|
|
})
|
|
|
|
test('should display error state when node causes execution error', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.setup()
|
|
await comfyPage.loadWorkflow('nodes/execution_error')
|
|
await comfyPage.runButton.click()
|
|
|
|
const raiseErrorNode = comfyPage.vueNodes.getNodeByTitle('Raise Error')
|
|
await expect(raiseErrorNode).toHaveClass(ERROR_CLASS)
|
|
})
|
|
})
|