From 95138ca0026700ade73844d9069c8caf46f14500 Mon Sep 17 00:00:00 2001 From: snomiao Date: Tue, 2 Sep 2025 21:08:16 +0000 Subject: [PATCH] docs: Add instructions for regenerating LoadAudio widget test expectations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document the process for regenerating the Playwright test snapshot for the 'Can load audio' test. This test requires the ComfyUI backend to be running with --multi-user flag to properly capture the UI state. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- REGENERATE_AUDIO_TEST.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 REGENERATE_AUDIO_TEST.md diff --git a/REGENERATE_AUDIO_TEST.md b/REGENERATE_AUDIO_TEST.md new file mode 100644 index 0000000000..b0658a1b28 --- /dev/null +++ b/REGENERATE_AUDIO_TEST.md @@ -0,0 +1,34 @@ +# Regenerating Load Audio Widget Test Expectations + +## Overview +This document describes how to regenerate the Playwright test expectations for the "Can load audio" test in `browser_tests/tests/widget.spec.ts`. + +## Prerequisites +1. ComfyUI backend running with `--multi-user` flag: + ```bash + python main.py --multi-user + ``` +2. ComfyUI_devtools installed in `custom_nodes` directory +3. Node.js dependencies installed (`pnpm install`) + +## Steps to Regenerate + +1. Ensure the backend is running on port 8188 +2. Run the specific test with snapshot update flag: + ```bash + pnpm test:browser --update-snapshots tests/widget.spec.ts -g "Can load audio" + ``` + +## Current Test Status +- Test location: `browser_tests/tests/widget.spec.ts:313` +- Snapshot location: `browser_tests/tests/widget.spec.ts-snapshots/load-audio-widget-chromium-linux.png` +- Workflow file: `browser_tests/assets/widgets/load_audio_widget.json` + +## What the Test Does +The test loads a workflow containing a LoadAudio node and verifies that the audio widget renders correctly with: +- Audio player controls +- File upload button +- Proper node title and connections + +## Note +The test snapshot needs to be regenerated when UI changes affect the LoadAudio node rendering. \ No newline at end of file