Introduce comprehensive documentation for the new `lora-manager-e2e` skill, which provides end-to-end testing workflows for LoRa Manager. The skill enables automated validation of standalone mode, including server management, UI interaction via Chrome DevTools MCP, and frontend-to-backend integration testing. Key additions: - Detailed skill description and prerequisites - Quick start workflow for server setup and browser debugging - Common E2E test patterns for page load verification, server restart, and API testing - Example test flows demonstrating step-by-step validation procedures - Scripts and MCP command examples for practical implementation This documentation supports automated testing of LoRa Manager's web interface and backend functionality, ensuring reliable end-to-end validation of features.
6.0 KiB
LoRa Manager E2E Test Scenarios
This document provides detailed test scenarios for end-to-end validation of LoRa Manager features.
Table of Contents
LoRA List Page
Scenario: Page Load and Display
Objective: Verify the LoRA list page loads correctly and displays models.
Steps:
- Navigate to
http://127.0.0.1:8188/loras - Wait for page title "LoRAs" to appear
- Take snapshot to verify:
- Header with "LoRAs" title is visible
- Search/filter controls are present
- Grid/list view toggle exists
- LoRA cards are displayed (if models exist)
- Pagination controls (if applicable)
Expected Result: Page loads without errors, UI elements are present.
Scenario: Search Functionality
Objective: Verify search filters LoRA models correctly.
Steps:
- Ensure at least one LoRA exists with known name (e.g., "test-character")
- Navigate to LoRA list page
- Enter search term in search box: "test"
- Press Enter or click search button
- Wait for results to update
Expected Result: Only LoRAs matching search term are displayed.
Verification Script:
# After search, verify filtered results
evaluate_script(function="""
() => {
const cards = document.querySelectorAll('.lora-card');
const names = Array.from(cards).map(c => c.dataset.name);
return { count: cards.length, names };
}
""")
Scenario: Filter by Tags
Objective: Verify tag filtering works correctly.
Steps:
- Navigate to LoRA list page
- Click on a tag (e.g., "character", "style")
- Wait for filtered results
Expected Result: Only LoRAs with selected tag are displayed.
Scenario: View Mode Toggle
Objective: Verify grid/list view toggle works.
Steps:
- Navigate to LoRA list page
- Click list view button
- Verify list layout
- Click grid view button
- Verify grid layout
Expected Result: View mode changes correctly, layout updates.
Model Details
Scenario: Open Model Details
Objective: Verify clicking a LoRA opens its details.
Steps:
- Navigate to LoRA list page
- Click on a LoRA card
- Wait for details panel/modal to open
Expected Result: Details panel shows:
- Model name
- Preview image
- Metadata (trigger words, tags, etc.)
- Action buttons (edit, delete, etc.)
Scenario: Edit Model Metadata
Objective: Verify metadata editing works end-to-end.
Steps:
- Open a LoRA's details
- Click "Edit" button
- Modify trigger words field
- Add/remove tags
- Save changes
- Refresh page
- Reopen the same LoRA
Expected Result: Changes persist after refresh.
Scenario: Delete Model
Objective: Verify model deletion works.
Steps:
- Open a LoRA's details
- Click "Delete" button
- Confirm deletion in dialog
- Wait for removal
Expected Result: Model removed from list, success message shown.
Recipes
Scenario: Recipe List Display
Objective: Verify recipes page loads and displays recipes.
Steps:
- Navigate to
http://127.0.0.1:8188/recipes - Wait for "Recipes" title
- Take snapshot
Expected Result: Recipe list displayed with cards/items.
Scenario: Create New Recipe
Objective: Verify recipe creation workflow.
Steps:
- Navigate to recipes page
- Click "New Recipe" button
- Fill recipe form:
- Name: "Test Recipe"
- Description: "E2E test recipe"
- Add LoRA models
- Save recipe
- Verify recipe appears in list
Expected Result: New recipe created and displayed.
Scenario: Apply Recipe
Objective: Verify applying a recipe to ComfyUI.
Steps:
- Open a recipe
- Click "Apply" or "Load in ComfyUI"
- Verify action completes
Expected Result: Recipe applied successfully.
Settings
Scenario: Settings Page Load
Objective: Verify settings page displays correctly.
Steps:
- Navigate to
http://127.0.0.1:8188/settings - Wait for "Settings" title
- Take snapshot
Expected Result: Settings form with various options displayed.
Scenario: Change Setting and Restart
Objective: Verify settings persist after restart.
Steps:
- Navigate to settings page
- Change a setting (e.g., default view mode)
- Save settings
- Restart server:
python scripts/start_server.py --restart --wait - Refresh browser page
- Navigate to settings
Expected Result: Changed setting value persists.
Import/Export
Scenario: Export Models List
Objective: Verify export functionality.
Steps:
- Navigate to LoRA list
- Click "Export" button
- Select format (JSON/CSV)
- Download file
Expected Result: File downloaded with correct data.
Scenario: Import Models
Objective: Verify import functionality.
Steps:
- Prepare import file
- Navigate to import page
- Upload file
- Verify import results
Expected Result: Models imported successfully, confirmation shown.
API Integration Tests
Scenario: Verify API Endpoints
Objective: Verify backend API responds correctly.
Test via browser console:
// List LoRAs
fetch('/loras/api/list').then(r => r.json()).then(console.log)
// Get LoRA details
fetch('/loras/api/detail/<id>').then(r => r.json()).then(console.log)
// Search LoRAs
fetch('/loras/api/search?q=test').then(r => r.json()).then(console.log)
Expected Result: APIs return valid JSON with expected structure.
Console Error Monitoring
During all tests, monitor browser console for errors:
# Check for JavaScript errors
messages = list_console_messages(types=["error"])
assert len(messages) == 0, f"Console errors found: {messages}"
Network Request Verification
Verify key API calls are made:
# List XHR requests
requests = list_network_requests(resourceTypes=["xhr", "fetch"])
# Look for specific endpoints
lora_list_requests = [r for r in requests if "/api/list" in r.get("url", "")]
assert len(lora_list_requests) > 0, "LoRA list API not called"