| name | lora-manager-e2e |
| description | End-to-end testing and validation for LoRa Manager features. Use when performing automated E2E validation of LoRa Manager standalone mode, including starting/restarting the server, using Chrome DevTools MCP to interact with the web UI at http://127.0.0.1:8188/loras, and verifying frontend-to-backend functionality. Covers workflow validation, UI interaction testing, and integration testing between the standalone Python backend and the browser frontend. |
LoRa Manager E2E Testing
This skill provides workflows and utilities for end-to-end testing of LoRa Manager using Chrome DevTools MCP.
Prerequisites
- LoRa Manager project cloned and dependencies installed (
pip install -r requirements.txt)
- Chrome browser available for debugging
- Chrome DevTools MCP connected
Quick Start Workflow
1. Start LoRa Manager Standalone
python .agents/skills/lora-manager-e2e/scripts/start_server.py --port 8188
Or manually:
cd /home/miao/workspace/ComfyUI/custom_nodes/ComfyUI-Lora-Manager
python standalone.py --port 8188
Wait for server ready message before proceeding.
2. Open Chrome Debug Mode
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-lora-manager http://127.0.0.1:8188/loras
3. Connect Chrome DevTools MCP
Ensure the MCP server is connected to Chrome at http://localhost:9222.
4. Navigate and Interact
Use Chrome DevTools MCP tools to:
- Take snapshots:
take_snapshot
- Click elements:
click
- Fill forms:
fill or fill_form
- Evaluate scripts:
evaluate_script
- Wait for elements:
wait_for
Common E2E Test Patterns
Pattern: Full Page Load Verification
navigate_page(type="url", url="http://127.0.0.1:8188/loras")
wait_for(text="LoRAs", timeout=10000)
snapshot = take_snapshot()
Pattern: Restart Server for Configuration Changes
python .agents/skills/lora-manager-e2e/scripts/start_server.py --port 8188 --restart
navigate_page(type="reload", ignoreCache=True)
wait_for(text="LoRAs", timeout=15000)
Pattern: Verify Backend API via Frontend
result = evaluate_script(function="""
async () => {
const response = await fetch('/loras/api/list');
const data = await response.json();
return { count: data.length, firstItem: data[0]?.name };
}
""")
Pattern: Form Submission Flow
fill_form(elements=[
{"uid": "search-input", "value": "character"},
])
click(uid="search-button")
wait_for(text="Results", timeout=5000)
snapshot = take_snapshot()
Pattern: Modal Dialog Interaction
click(uid="add-lora-button")
wait_for(text="Add LoRA", timeout=3000)
fill_form(elements=[
{"uid": "lora-name", "value": "Test LoRA"},
{"uid": "lora-path", "value": "/path/to/lora.safetensors"},
])
click(uid="modal-submit-button")
wait_for(text="Success", timeout=5000)
Available Scripts
scripts/start_server.py
Starts or restarts the LoRa Manager standalone server.
python scripts/start_server.py [--port PORT] [--restart] [--wait]
Options:
--port: Server port (default: 8188)
--restart: Kill existing server before starting
--wait: Wait for server to be ready before exiting
scripts/wait_for_server.py
Polls server until ready or timeout.
python scripts/wait_for_server.py [--port PORT] [--timeout SECONDS]
Test Scenarios Reference
See references/test-scenarios.md for detailed test scenarios including:
- LoRA list display and filtering
- Model metadata editing
- Recipe creation and management
- Settings configuration
- Import/export functionality
Network Request Verification
Use list_network_requests and get_network_request to verify API calls:
requests = list_network_requests(resourceTypes=["xhr", "fetch"])
details = get_network_request(reqid=123)
Console Message Monitoring
messages = list_console_messages(types=["error", "warn"])
Performance Testing
performance_start_trace(reload=True, autoStop=False)
results = performance_stop_trace()
Cleanup
Always ensure proper cleanup after tests:
- Stop the standalone server
- Close browser pages (keep at least one open)
- Clear temporary data if needed