mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 15:40:10 +00:00
- Remove 27 deprecated/wrapper methods from ComfyPage - Migrate callers to use helper classes directly: - keyboard.selectAll/bypass/undo/redo/moveUp/moveDown - clipboard.copy/paste - settings.setSetting/getSetting - workflow.loadWorkflow/deleteWorkflow/setupWorkflowsDirectory - contextMenu.clickMenuItem/clickLitegraphMenuItem - nodeOps.resizeNode with DefaultGraphPositions - canvasOps.clickEmptySpace with DefaultGraphPositions - Replace deprecated node click methods with direct canvas clicks - Replace position getter properties with DefaultGraphPositions imports Amp-Thread-ID: https://ampcode.com/threads/T-019c15e7-2319-76ec-855e-098ec75ef18a Co-authored-by: Amp <amp@ampcode.com>
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import {
|
|
comfyExpect as expect,
|
|
comfyPageFixture as test
|
|
} from '../../../fixtures/ComfyPage'
|
|
|
|
const ERROR_CLASS = /border-node-stroke-error/
|
|
|
|
test.describe('Vue Node Error', () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.settings.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.workflow.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.workflow.loadWorkflow('nodes/execution_error')
|
|
await comfyPage.runButton.click()
|
|
|
|
const raiseErrorNode = comfyPage.vueNodes.getNodeByTitle('Raise Error')
|
|
await expect(raiseErrorNode).toHaveClass(ERROR_CLASS)
|
|
})
|
|
})
|