* Add new folder button * Add tree util test * nit * Support empty folder in node library * Drag to bookmark folder * Use bookmark icon for bookmark folder * Highlight on dragover * nit * Auto-expand on item added * Extract bookmark system as store * Add context menu on bookmark folder * Add editable text * Fix reactivity * Plumb editable text * refactor * Rename node * Fix focus * Prevent name collision * nit * Add new folder * nested folder support * Change drag behavior * Add basic playwright tests * nit * Target tree-node-content instead of tree-node
Playwright Testing for ComfyUI_frontend
This document outlines the setup and usage of Playwright for testing the ComfyUI_frontend project.
Setup
Ensure you have Node.js v20 or later installed. Then, set up the Chromium test driver:
npx playwright install chromium --with-deps
Running Tests
There are two ways to run the tests:
-
Headless mode with report generation:
npx playwright testThis runs all tests without a visible browser and generates a comprehensive test report.
-
UI mode for interactive testing:
npx playwright test --uiThis opens a user interface where you can select specific tests to run and inspect the test execution timeline.
Screenshot Expectations
Due to variations in system font rendering, screenshot expectations are platform-specific. Please note:
- We maintain Linux screenshot expectations as our GitHub Action runner operates in a Linux environment.
- To set new test expectations:
- Create a pull request from a
Comfy-Org/ComfyUI_frontendbranch. - Add the
New Browser Test Expectationtag to your pull request. - This will trigger a GitHub action to update the screenshot expectations automatically.
- Create a pull request from a
Note: If you're making a pull request from a forked repository, the GitHub action won't be able to commit updated screenshot expectations directly to your PR branch.