mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 14:27:40 +00:00
Backport of #7411 to `core/1.34` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7516-backport-core-1-34-fix-loading-api-format-workflow-that-contains-parameters-string-2ca6d73d365081438d19fd6ed3272684) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
52 lines
1.6 KiB
TypeScript
52 lines
1.6 KiB
TypeScript
import { expect } from '@playwright/test'
|
|
|
|
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
|
|
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled')
|
|
})
|
|
|
|
test.describe('Load Workflow in Media', () => {
|
|
const fileNames = [
|
|
'workflow.webp',
|
|
'edited_workflow.webp',
|
|
'no_workflow.webp',
|
|
'large_workflow.webp',
|
|
'workflow_prompt_parameters.png',
|
|
'workflow.webm',
|
|
// Skipped due to 3d widget unstable visual result.
|
|
// 3d widget shows grid after fully loaded.
|
|
// 'workflow.glb',
|
|
'workflow.mp4',
|
|
'workflow.mov',
|
|
'workflow.m4v',
|
|
'workflow.svg'
|
|
// TODO: Re-enable after fixing test asset to use core nodes only
|
|
// Currently opens missing nodes dialog which is outside scope of AVIF loading functionality
|
|
// 'workflow.avif'
|
|
]
|
|
fileNames.forEach(async (fileName) => {
|
|
test(`Load workflow in ${fileName} (drop from filesystem)`, async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.dragAndDropFile(`workflowInMedia/${fileName}`)
|
|
await expect(comfyPage.canvas).toHaveScreenshot(`${fileName}.png`)
|
|
})
|
|
})
|
|
|
|
const urls = [
|
|
'https://comfyanonymous.github.io/ComfyUI_examples/hidream/hidream_dev_example.png'
|
|
]
|
|
urls.forEach(async (url) => {
|
|
test(`Load workflow from URL ${url} (drop from different browser tabs)`, async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.dragAndDropURL(url)
|
|
const readableName = url.split('/').pop()
|
|
await expect(comfyPage.canvas).toHaveScreenshot(
|
|
`dropped_workflow_url_${readableName}.png`
|
|
)
|
|
})
|
|
})
|
|
})
|