mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +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)
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { expect } from '@playwright/test'
|
|
|
|
import { comfyPageFixture as test } from '@e2e/fixtures/ComfyPage'
|
|
|
|
test.describe(
|
|
'Save Image and WEBM preview',
|
|
{ tag: ['@screenshot', '@widget', '@vue-nodes'] },
|
|
() => {
|
|
test('Can preview both SaveImage and SaveWEBM outputs', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.workflow.loadWorkflow(
|
|
'widgets/save_image_and_animated_webp'
|
|
)
|
|
await comfyPage.vueNodes.waitForNodes()
|
|
|
|
await comfyPage.runButton.click()
|
|
|
|
const saveImageNode = comfyPage.vueNodes.getNodeByTitle('Save Image')
|
|
const saveWebmNode = comfyPage.vueNodes.getNodeByTitle('SaveWEBM')
|
|
|
|
// Wait for SaveImage to render an img inside .image-preview
|
|
await expect(saveImageNode.locator('.image-preview img')).toBeVisible({
|
|
timeout: 30000
|
|
})
|
|
|
|
// Wait for SaveWEBM to render a video inside .video-preview
|
|
await expect(saveWebmNode.locator('.video-preview video')).toBeVisible({
|
|
timeout: 30000
|
|
})
|
|
|
|
await expect(comfyPage.page).toHaveScreenshot(
|
|
'save-image-and-webm-preview.png'
|
|
)
|
|
})
|
|
}
|
|
)
|