Comfy-Org / Comfy-Org/ComfyUI_frontend
test: extend fixture-generation script to cover browser_tests embedded-workflow assets
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Summary
PR #11307 introduced `scripts/generate-embedded-metadata-test-files.py`, a script that programmatically generates binary fixture files (WebP, AVIF, FLAC, MP3, Opus, WebM, MP4) with embedded ComfyUI workflow/prompt metadata for unit tests under `src/scripts/metadata/__fixtures__/`.
The `browser_tests/assets/workflowInMedia/` directory contains a similar set of manually-created binary assets that are used in browser/e2e tests:
- `workflow.avif`
- `workflow.mp4`
- `workflow.svg`
- `workflow.webm`
- `workflow.webp`
- `workflow_itxt.png`
- `workflow_prompt_parameters.png`
- `edited_workflow.webp`
- `large_workflow.webp`
- `no_workflow.webp`
These are currently committed as opaque binaries with no documented generation process, making them hard to update or audit.
## Proposed Work
- Extend `scripts/generate-embedded-metadata-test-files.py` (or introduce a shared fixture-generation system) to also generate the `browser_tests/assets/workflowInMedia/` assets.
- Ensure the script is the **single source of truth** for all test fixtures that carry embedded workflow metadata, covering both unit test and browser/e2e test assets.
- Document the generation process in the script and/or a `README` so contributors can regenerate fixtures after workflow schema changes.
- Consider parameterising the output directory so one script can target both `src/scripts/metadata/__fixtures__/` and `browser_tests/assets/workflowInMedia/`.
## References
- PR introducing the generator script: #11307
- Requested by @christian-byrne in [this review comment](https://github.com/Comfy-Org/ComfyUI_frontend/pull/11307#discussion_r3104358445)
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11355-test-extend-fixture-generation-script-to-cover-browser_tests-embedded-workflow-asset-3466d73d3650818d95cfeb579d908fab) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.