mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-28 18:54:09 +00:00
This commit integrates the previously recovered ComfyUI Manager functionality with significant enhancements from PR #3367, including: ## Core Manager System Recovery - **v2 API Integration**: All manager endpoints now use `/v2/manager/queue/*` - **Task Queue System**: Complete client-side task queuing with WebSocket status - **Service Layer**: Comprehensive manager service with all CRUD operations - **Store Integration**: Full manager store with progress dialog support ## New Features & Enhancements - **Reactive Feature Flags**: Foundation for dynamic feature toggling - **Enhanced UI Components**: Improved loading states, progress tracking - **Package Management**: Install, update, enable/disable functionality - **Version Selection**: Support for latest/nightly package versions - **Progress Dialogs**: Real-time installation progress with logs - **Missing Node Detection**: Automated detection and installation prompts ## Technical Improvements - **TypeScript Definitions**: Complete type system for manager operations - **WebSocket Integration**: Real-time status updates via `cm-queue-status` - **Error Handling**: Comprehensive error handling with user feedback - **Testing**: Updated test suites for new functionality - **Documentation**: Complete backup documentation for recovery process ## API Endpoints Restored - `manager/queue/start` - Start task queue - `manager/queue/status` - Get queue status - `manager/queue/task` - Queue individual tasks - `manager/queue/install` - Install packages - `manager/queue/update` - Update packages - `manager/queue/disable` - Disable packages ## Breaking Changes - Manager API base URL changed to `/v2/` - Updated TypeScript interfaces for manager operations - New WebSocket message format for queue status This restores all critical manager functionality lost during the previous rebase while integrating the latest enhancements and maintaining compatibility with the current main branch. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
45 lines
1.8 KiB
Markdown
45 lines
1.8 KiB
Markdown
# ComfyUI Frontend Testing Guide
|
|
|
|
This guide provides an overview of testing approaches used in the ComfyUI Frontend codebase. These guides are meant to document any particularities or nuances of writing tests in this codebase, rather than being a comprehensive guide to testing in general. By reading these guides first, you may save yourself some time when encountering issues.
|
|
|
|
## Testing Documentation
|
|
|
|
Documentation for unit tests is organized into three guides:
|
|
|
|
- [Component Testing](./component-testing.md) - How to test Vue components
|
|
- [Unit Testing](./unit-testing.md) - How to test utility functions, composables, and other non-component code
|
|
- [Store Testing](./store-testing.md) - How to test Pinia stores specifically
|
|
|
|
## Testing Structure
|
|
|
|
The ComfyUI Frontend project uses a mixed approach to unit test organization:
|
|
|
|
- **Component Tests**: Located directly alongside their components with a `.spec.ts` extension
|
|
- **Unit Tests**: Located in the `tests-ui/tests/` directory
|
|
- **Store Tests**: Located in the `tests-ui/tests/store/` directory
|
|
- **Browser Tests**: These are located in the `browser_tests/` directory. There is a dedicated README in the `browser_tests/` directory, so it will not be covered here.
|
|
|
|
## Test Frameworks and Libraries
|
|
|
|
Our tests use the following frameworks and libraries:
|
|
|
|
- [Vitest](https://vitest.dev/) - Test runner and assertion library
|
|
- [@vue/test-utils](https://test-utils.vuejs.org/) - Vue component testing utilities
|
|
- [Pinia](https://pinia.vuejs.org/cookbook/testing.html) - For store testing
|
|
|
|
## Getting Started
|
|
|
|
To run the tests locally:
|
|
|
|
```bash
|
|
# Run unit tests
|
|
pnpm test:unit
|
|
|
|
# Run unit tests in watch mode
|
|
pnpm test:unit:dev
|
|
|
|
# Run component tests with browser-native environment
|
|
pnpm test:component
|
|
```
|
|
|
|
Refer to the specific guides for more detailed information on each testing type. |