#!/bin/bash # Run all E2E tests in headed + slow-motion mode. # Perfect for watching realistic user behavior including full route planning. set -e echo "🚀 Tesla Roadtrip - Headed E2E Test Suite (with Slow Motion)" echo "=============================================================" echo "" echo "Tests will run visibly so you can watch:" echo " • Local Heavy badge" echo " • Chat + Quick Prompts" echo " • Multi-day itinerary generation" echo " • Real OSRM driving routes (red polylines) on the map" echo " • Summary stats (km, hours, Superchargers count)" echo "" export HEADED=1 echo "→ Running Route-Focused Smoke Test..." npx playwright test tests/grok-api-diagnostic.spec.ts --headed --reporter=list echo "" echo "→ Running Full Comprehensive Route Planning Tests..." npx playwright test tests/roadtrip-flow.spec.ts --headed --reporter=list echo "" echo "✅ All headed E2E tests completed successfully." echo " Videos and screenshots are in test-results/"