mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
## Summary Simplifies test setup for common settings ## Changes - **What**: - add vue-nodes tag to auto enable nodes 2.0 - remove UseNewMenu Top as this is default ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11184-test-Simplify-vue-node-menu-test-setup-3416d73d3650815487e0c357d28761fe) by [Unito](https://www.unito.io)
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import {
|
|
comfyExpect as expect,
|
|
comfyPageFixture as test
|
|
} from '@e2e/fixtures/ComfyPage'
|
|
|
|
const ERROR_CLASS = /ring-destructive-background/
|
|
|
|
test.describe('Vue Node Error', { tag: '@vue-nodes' }, () => {
|
|
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' })
|
|
.getByTestId('node-inner-wrapper')
|
|
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.page
|
|
.locator('[data-node-id]')
|
|
.filter({ hasText: 'Raise Error' })
|
|
.getByTestId('node-inner-wrapper')
|
|
await expect(raiseErrorNode).toHaveClass(ERROR_CLASS)
|
|
})
|
|
})
|