Execute comprehensive UI testing for any Ashfolio version using Playwright MCP tools. Automatically adapt to version-specific requirements and provide complete test coverage.
mcp__playwright__browser_navigate- Page navigationmcp__playwright__browser_snapshot- Accessibility snapshotsmcp__playwright__browser_click- Element interactionmcp__playwright__browser_wait_for- State waitingmcp__playwright__browser_evaluate- Data extractionmcp__playwright__browser_take_screenshot- Visual documentationmcp__playwright__browser_console_messages- Error monitoring
Reference @.code-gps.yaml for:
- Current route mappings and LiveView components
- Available test endpoints and navigation paths
- Component usage patterns for element targeting
version_config:
target: "v0.X.Y"
checklist_path: "docs/archive/versions/vX.Y/VX.Y.Z_PLAYWRIGHT_TEST_CHECKLIST.md"
assessment_path: "docs/archive/versions/vX.Y/VX.Y.Z_PLAYWRIGHT_COVERAGE_ASSESSMENT.md"
primary_routes: [] # From .code-gps.yamlv0_6_0:
primary_route: "/corporate-actions"
key_features:
- conditional_forms
- validation_logic
- action_types
performance_targets:
form_submission: 500ms
validation: 100ms
critical_selectors:
- "select[name='action_type']"
- "button:has-text('Apply Action')"
- ".validation-error"
validation_assertions:
- field_visibility_changes
- calculation_accuracy
- data_persistencev0_7_0:
primary_route: "/advanced_analytics"
key_features:
- efficient_frontier
- portfolio_optimization
- cache_integration
performance_targets:
calculation: 500ms
cache_hit: 100ms
refresh_all: 2000ms
critical_selectors:
- "button:has-text('Calculate Efficient Frontier')"
- ".bg-blue-50" # Min variance portfolio
- ".bg-green-50" # Tangency portfolio
- ".bg-purple-50" # Max return portfolio
validation_assertions:
- sharpe_ratio_ordering
- weight_summation_100_percent
- volatility_orderingv0_X_Y:
primary_route: "/feature-url"
key_features: []
performance_targets: {}
critical_selectors: []
validation_assertions: []- Route Discovery: Parse
@.code-gps.yamlfor available routes - Version Detection: Extract version from checklist path
- Configuration Load: Apply version-specific test configuration
- Server Verification:
mcp__playwright__browser_navigate(url: "http://localhost:4000/health")
- Navigation Test: Navigate to primary route
- Page Load: Take accessibility snapshot for element discovery
- Initial Screenshot: Document starting state
- Console Check: Verify no initial JavaScript errors
For each feature in version configuration:
- Element Discovery: Use snapshot to locate interactive elements
- Action Execution: Click buttons, fill forms using MCP tools
- Performance Measurement: Time operations with wait_for
- State Validation: Take screenshots and snapshots after actions
- Data Extraction: Use evaluate tool for numerical validation
- Error Collection: Check console messages for issues
- Evidence Capture: Take final screenshots with naming convention
- Results Documentation: Populate assessment documents
navigation_sequence:
- tool: mcp__playwright__browser_navigate
params:
url: "http://localhost:4000{route}"
- tool: mcp__playwright__browser_snapshot
purpose: "Discover page elements and structure"
- tool: mcp__playwright__browser_take_screenshot
params:
filename: "{version}-{feature}-initial.png"performance_measurement:
- tool: mcp__playwright__browser_evaluate
params:
function: "() => { window.testStartTime = Date.now(); }"
- tool: mcp__playwright__browser_click
params:
element: "{button_description}"
ref: "{element_reference}"
- tool: mcp__playwright__browser_wait_for
params:
text: "{completion_indicator}"
- tool: mcp__playwright__browser_evaluate
params:
function: "() => Date.now() - window.testStartTime"mathematical_validation:
- tool: mcp__playwright__browser_evaluate
params:
function: "() => Array.from(document.querySelectorAll('.allocation-weight')).map(el => parseFloat(el.textContent))"
- tool: mcp__playwright__browser_evaluate
params:
function: "(weights) => Math.abs(weights.reduce((a,b) => a+b, 0) - 100) < 0.01"error_detection:
- tool: mcp__playwright__browser_console_messages
purpose: "Collect all console output"
- tool: mcp__playwright__browser_evaluate
params:
function: "() => window.errors || []"Reference current routes from .code-gps.yaml:
/advanced_analytics→ AdvancedAnalyticsLive (v0.7.0 target)/corporate-actions→ CorporateActionLive (v0.6.0 target)/transactions→ TransactionLive (data setup)/→ DashboardLive (integration testing)
integration_flow:
setup_route: "/transactions"
primary_route: "{version_primary_route}"
validation_routes:
- "/dashboard"
- "/net_worth"screenshot_patterns:
initial: "{version}-{feature}-initial.png"
loading: "{version}-{feature}-loading.png"
results: "{version}-{feature}-results.png"
error: "{version}-{feature}-error.png"
mobile: "{version}-{feature}-mobile.png"performance_results:
feature: "{feature_name}"
measurement_type: "{calculation|navigation|interaction}"
duration_ms: 0
target_ms: 0
passed: false
timestamp: ""validation_results:
feature: "{feature_name}"
validation_type: "{mathematical|visual|functional}"
expected: ""
actual: ""
passed: false
details: ""- All checklist items marked complete
- All performance targets met
- Zero critical JavaScript errors
- All required screenshots captured
- Assessment document fully populated
- Version features validated per configuration
- Integration points verified
- Mathematical accuracy confirmed (where applicable)
- Visual elements properly displayed
"Execute Playwright testing for {version} using @docs/archive/versions/{version}/{VERSION}_PLAYWRIGHT_TEST_CHECKLIST.md. Reference @.code-gps.yaml for route information and populate @docs/archive/versions/{version}/{VERSION}_PLAYWRIGHT_COVERAGE_ASSESSMENT.md with results."
"Execute comprehensive regression testing across multiple versions, comparing performance metrics and identifying functionality changes between v0.6.0 and v0.7.0."
This agent specification leverages MCP tools directly and integrates with the existing code GPS system for maximum effectiveness.