mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +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)
56 lines
1.6 KiB
TypeScript
56 lines
1.6 KiB
TypeScript
import type { ComfyPage } from '@e2e/fixtures/ComfyPage'
|
|
import {
|
|
comfyPageFixture as test,
|
|
comfyExpect as expect
|
|
} from '@e2e/fixtures/ComfyPage'
|
|
import { TestIds } from '@e2e/fixtures/selectors'
|
|
|
|
test.describe('Errors tab - Execution errors', { tag: '@ui' }, () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.settings.setSetting(
|
|
'Comfy.RightSidePanel.ShowErrorsTab',
|
|
true
|
|
)
|
|
await comfyPage.setup()
|
|
})
|
|
|
|
async function openExecutionErrorTab(comfyPage: ComfyPage) {
|
|
await comfyPage.workflow.loadWorkflow('nodes/execution_error')
|
|
await comfyPage.command.executeCommand('Comfy.QueuePrompt')
|
|
|
|
const errorOverlay = comfyPage.page.getByTestId(
|
|
TestIds.dialogs.errorOverlay
|
|
)
|
|
await expect(errorOverlay).toBeVisible()
|
|
await errorOverlay
|
|
.getByTestId(TestIds.dialogs.errorOverlaySeeErrors)
|
|
.click()
|
|
await expect(errorOverlay).toBeHidden()
|
|
}
|
|
|
|
test('Should show Find on GitHub and Copy buttons in error card', async ({
|
|
comfyPage
|
|
}) => {
|
|
await openExecutionErrorTab(comfyPage)
|
|
|
|
await expect(
|
|
comfyPage.page.getByTestId(TestIds.dialogs.errorCardFindOnGithub)
|
|
).toBeVisible()
|
|
await expect(
|
|
comfyPage.page.getByTestId(TestIds.dialogs.errorCardCopy)
|
|
).toBeVisible()
|
|
})
|
|
|
|
test('Should show error message in runtime error panel', async ({
|
|
comfyPage
|
|
}) => {
|
|
await openExecutionErrorTab(comfyPage)
|
|
|
|
const runtimePanel = comfyPage.page.getByTestId(
|
|
TestIds.dialogs.runtimeErrorPanel
|
|
)
|
|
await expect(runtimePanel).toBeVisible()
|
|
await expect(runtimePanel).toContainText(/\S/)
|
|
})
|
|
})
|