114 lines
4.1 KiB
Bash
Executable file
114 lines
4.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Edge Directionality - Quick Test Helper
|
|
# Run this script to get testing instructions and verify setup
|
|
|
|
echo "═══════════════════════════════════════════════════════"
|
|
echo " Edge Directionality - Manual Testing Helper"
|
|
echo "═══════════════════════════════════════════════════════"
|
|
echo ""
|
|
|
|
# Check if dev server is running
|
|
echo "📡 Checking dev server status..."
|
|
if lsof -i :5173 | grep -q LISTEN; then
|
|
echo "✅ Dev server is RUNNING on port 5173"
|
|
echo ""
|
|
else
|
|
echo "❌ Dev server is NOT running"
|
|
echo ""
|
|
echo "To start the dev server:"
|
|
echo " cd /Users/kempersc/apps/glam/frontend"
|
|
echo " npm run dev"
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
|
|
# Check if page loads
|
|
echo "🌐 Checking UML viewer page..."
|
|
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:5173/uml-viewer)
|
|
if [ "$HTTP_CODE" == "200" ]; then
|
|
echo "✅ UML viewer page loads successfully (HTTP $HTTP_CODE)"
|
|
echo ""
|
|
else
|
|
echo "⚠️ UML viewer returned HTTP $HTTP_CODE"
|
|
echo ""
|
|
fi
|
|
|
|
# List available test diagrams
|
|
echo "📂 Available test diagrams:"
|
|
echo ""
|
|
echo "SMALL (Quick validation):"
|
|
ls -1 /Users/kempersc/apps/glam/schemas/20251121/uml/mermaid/ | grep -E "(NetworkOrganisation|Consortium|EncompassingBody).*\.mmd$" | head -3 | sed 's/^/ - /'
|
|
echo ""
|
|
echo "MEDIUM (Full feature testing):"
|
|
ls -1 /Users/kempersc/apps/glam/schemas/20251121/uml/mermaid/ | grep -E "(custodian_multi_aspect|organizational_structure).*\.mmd$" | head -2 | sed 's/^/ - /'
|
|
echo ""
|
|
echo "LARGE (Performance testing):"
|
|
ls -1 /Users/kempersc/apps/glam/schemas/20251121/uml/mermaid/ | grep -E "(full_schema|core_classes).*\.mmd$" | head -2 | sed 's/^/ - /'
|
|
echo ""
|
|
|
|
# Implementation verification
|
|
echo "🔍 Implementation verification:"
|
|
echo ""
|
|
|
|
# Check if dual arrow markers exist
|
|
if grep -q "arrow-.*-highlight" /Users/kempersc/apps/glam/frontend/src/components/uml/UMLVisualization.tsx; then
|
|
echo "✅ Dual arrow markers (normal + highlight) implemented"
|
|
else
|
|
echo "❌ Dual arrow markers NOT found"
|
|
fi
|
|
|
|
# Check if bidirectional detection exists
|
|
if grep -q "bidirectional.*association.*aggregation" /Users/kempersc/apps/glam/frontend/src/components/uml/UMLVisualization.tsx; then
|
|
echo "✅ Bidirectional edge detection implemented"
|
|
else
|
|
echo "❌ Bidirectional detection NOT found"
|
|
fi
|
|
|
|
# Check if click handler exists
|
|
if grep -q "on('click'" /Users/kempersc/apps/glam/frontend/src/components/uml/UMLVisualization.tsx; then
|
|
echo "✅ Click-to-reverse handler implemented"
|
|
else
|
|
echo "❌ Click handler NOT found"
|
|
fi
|
|
|
|
# Check if hover effects exist
|
|
if grep -q "on('mouseenter'" /Users/kempersc/apps/glam/frontend/src/components/uml/UMLVisualization.tsx; then
|
|
echo "✅ Hover effects implemented"
|
|
else
|
|
echo "❌ Hover effects NOT found"
|
|
fi
|
|
|
|
echo ""
|
|
echo "═══════════════════════════════════════════════════════"
|
|
echo " 🚀 Ready to Test!"
|
|
echo "═══════════════════════════════════════════════════════"
|
|
echo ""
|
|
echo "1. Open your browser to:"
|
|
echo " 👉 http://localhost:5173/uml-viewer"
|
|
echo ""
|
|
echo "2. Open Browser DevTools (F12)"
|
|
echo ""
|
|
echo "3. Load a test diagram from the picker"
|
|
echo ""
|
|
echo "4. Follow the test checklist in:"
|
|
echo " 📄 MANUAL_TESTING_RESULTS.md"
|
|
echo ""
|
|
echo "5. Check off each test as you complete it"
|
|
echo ""
|
|
echo "═══════════════════════════════════════════════════════"
|
|
echo ""
|
|
|
|
# Offer to open browser
|
|
if command -v open &> /dev/null; then
|
|
read -p "Open browser now? (y/n): " -n 1 -r
|
|
echo
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
echo "Opening browser..."
|
|
open "http://localhost:5173/uml-viewer"
|
|
fi
|
|
fi
|
|
|
|
echo ""
|
|
echo "Happy testing! 🎉"
|
|
echo ""
|