v1.0 - Version stable: multi-PC, détection UI-DETR-1, 3 modes exécution
- Frontend v4 accessible sur réseau local (192.168.1.40) - Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard) - Ollama GPU fonctionnel - Self-healing interactif - Dashboard confiance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
137
visual_workflow_builder/test_canvas.sh
Executable file
137
visual_workflow_builder/test_canvas.sh
Executable file
@@ -0,0 +1,137 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Test Canvas - Visual Workflow Builder
|
||||
#
|
||||
# Script de test rapide pour vérifier que le Canvas fonctionne
|
||||
#
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Colors
|
||||
GREEN='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
echo "=========================================="
|
||||
echo "Visual Workflow Builder - Canvas Tests"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# Test 1: Vérifier que les fichiers existent
|
||||
echo -e "${BLUE}Test 1: Vérification des fichiers...${NC}"
|
||||
FILES=(
|
||||
"frontend/src/components/Canvas/index.tsx"
|
||||
"frontend/src/components/Canvas/CustomNode.tsx"
|
||||
"frontend/src/components/Canvas/Canvas.css"
|
||||
"frontend/src/App.tsx"
|
||||
"frontend/src/index.tsx"
|
||||
)
|
||||
|
||||
ALL_FILES_EXIST=true
|
||||
for file in "${FILES[@]}"; do
|
||||
if [ -f "$SCRIPT_DIR/$file" ]; then
|
||||
echo -e " ${GREEN}✓${NC} $file"
|
||||
else
|
||||
echo -e " ${RED}✗${NC} $file (manquant)"
|
||||
ALL_FILES_EXIST=false
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$ALL_FILES_EXIST" = true ]; then
|
||||
echo -e "${GREEN}✓ Tous les fichiers existent${NC}"
|
||||
else
|
||||
echo -e "${RED}✗ Certains fichiers manquent${NC}"
|
||||
exit 1
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 2: Vérifier node_modules
|
||||
echo -e "${BLUE}Test 2: Vérification des dépendances...${NC}"
|
||||
if [ -d "$SCRIPT_DIR/frontend/node_modules" ]; then
|
||||
echo -e "${GREEN}✓ node_modules existe${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}⚠ node_modules manquant, installation...${NC}"
|
||||
cd "$SCRIPT_DIR/frontend"
|
||||
npm install
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "${GREEN}✓ Dépendances installées${NC}"
|
||||
else
|
||||
echo -e "${RED}✗ Échec de l'installation${NC}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 3: Type checking
|
||||
echo -e "${BLUE}Test 3: Vérification TypeScript...${NC}"
|
||||
cd "$SCRIPT_DIR/frontend"
|
||||
npm run type-check > /tmp/typecheck.log 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "${GREEN}✓ Aucune erreur TypeScript${NC}"
|
||||
else
|
||||
echo -e "${RED}✗ Erreurs TypeScript détectées${NC}"
|
||||
echo "Voir: /tmp/typecheck.log"
|
||||
cat /tmp/typecheck.log
|
||||
exit 1
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 4: Build
|
||||
echo -e "${BLUE}Test 4: Build production...${NC}"
|
||||
npm run build > /tmp/build.log 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "${GREEN}✓ Build réussi${NC}"
|
||||
|
||||
# Vérifier que le bundle existe
|
||||
if [ -f "$SCRIPT_DIR/frontend/dist/index.html" ]; then
|
||||
echo -e "${GREEN}✓ Bundle créé${NC}"
|
||||
|
||||
# Afficher la taille du bundle
|
||||
BUNDLE_SIZE=$(du -h "$SCRIPT_DIR/frontend/dist"/*.js | cut -f1 | head -1)
|
||||
echo -e " Taille du bundle: ${BUNDLE_SIZE}"
|
||||
else
|
||||
echo -e "${RED}✗ Bundle non créé${NC}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}✗ Build échoué${NC}"
|
||||
echo "Voir: /tmp/build.log"
|
||||
tail -20 /tmp/build.log
|
||||
exit 1
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 5: Vérifier le backend
|
||||
echo -e "${BLUE}Test 5: Vérification du backend...${NC}"
|
||||
if curl -s http://localhost:5001/health > /dev/null 2>&1; then
|
||||
echo -e "${GREEN}✓ Backend accessible${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}⚠ Backend non accessible${NC}"
|
||||
echo " Pour démarrer: cd $SCRIPT_DIR && ./start.sh"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 6: Vérifier le frontend
|
||||
echo -e "${BLUE}Test 6: Vérification du frontend...${NC}"
|
||||
if curl -s http://localhost:3000 > /dev/null 2>&1; then
|
||||
echo -e "${GREEN}✓ Frontend accessible${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}⚠ Frontend non accessible${NC}"
|
||||
echo " Pour démarrer: cd $SCRIPT_DIR/frontend && npm start"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Résumé
|
||||
echo "=========================================="
|
||||
echo -e "${GREEN}✓ TOUS LES TESTS PASSENT !${NC}"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
echo "Pour tester le Canvas:"
|
||||
echo " 1. Démarrer le backend: ./start.sh"
|
||||
echo " 2. Démarrer le frontend: cd frontend && npm start"
|
||||
echo " 3. Ouvrir: http://localhost:3000"
|
||||
echo ""
|
||||
echo "Voir TEST_CANVAS.md pour le guide complet"
|
||||
echo "=========================================="
|
||||
Reference in New Issue
Block a user