Files
ComfyUI_frontend/browser_tests
Chenlei Hu d04dbcd2c1 [Major Refactor] Use TreeExplorer on nodeLibrarySidebarTab (#699)
* Basic move

* Add back node bookmark

* Move node preview

* Fix drag node to canvas

* Restore click node to add to canvas

* Split bookmark tree and library tree

* Migrate rename and delete context menu

* Fix expanded keys

* Split components

* Support extra menu items

* Context menu only for folder

* Migrate add folder

* Handle drop

* Store color customization

* remove extra padding

* Do not show context menu if no item

* Hide divider if no bookmark

* Sort bookmarks alphabetically default

* nit

* proper edit

* Update test selectors

* Auto expand on item drop

* nit

* Fix tests

* Search also searches bookmarks tree

* Add serach playwright test
2024-09-01 14:03:15 -04:00
..
2024-08-29 18:01:57 -04:00
2024-08-19 22:45:06 -04:00

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:

  1. Headless mode with report generation:

    npx playwright test
    

    This runs all tests without a visible browser and generates a comprehensive test report.

  2. UI mode for interactive testing:

    npx playwright test --ui
    

    This opens a user interface where you can select specific tests to run and inspect the test execution timeline.

    Playwright UI Mode

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:
    1. Create a pull request from a Comfy-Org/ComfyUI_frontend branch.
    2. Add the New Browser Test Expectation tag to your pull request.
    3. This will trigger a GitHub action to update the screenshot expectations automatically.

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.