mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
* move subgraph test assets into subfolder * [refactor] Organize browser test assets into logical folders Reorganized test assets for better maintainability: - groupnodes/: GroupNode feature tests - groups/: Visual grouping tests - missing/: Missing nodes/models tests - links/: Link-related tests - inputs/: Input widget tests - widgets/: Widget-specific tests - nodes/: Node-related tests - workflowInMedia/: Workflow media files Updated all loadWorkflow references to use new folder structure. Fixed programmatic filename references to prevent test failures. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [fix] Update mobile test to use new asset path * [fix] Update remaining loadWorkflow calls to use new folder structure * [fix] Fix remaining programmatic filename references * [fix] Run prettier formatting * [fix] Fix setupWorkflowsDirectory references to use correct folder paths * [refactor] Rename subgraph folder to subgraphs for consistency * [fix] Fix breadcrumb name in subgraph DOM widget test * Update test expectations [skip ci] --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: github-actions <github-actions@github.com>
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
import { expect } from '@playwright/test'
|
|
|
|
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
|
|
|
|
test.describe('Load Workflow in Media', () => {
|
|
const fileNames = [
|
|
'workflow.webp',
|
|
'edited_workflow.webp',
|
|
'no_workflow.webp',
|
|
'large_workflow.webp',
|
|
'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',
|
|
'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`
|
|
)
|
|
})
|
|
})
|
|
})
|