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:
249
visual_workflow_builder/test_documentation_simple.py
Executable file
249
visual_workflow_builder/test_documentation_simple.py
Executable file
@@ -0,0 +1,249 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test simple pour diagnostiquer le problème de documentation
|
||||
"""
|
||||
|
||||
s
|
||||
import json
|
||||
import time
|
||||
from pathlib im
|
||||
|
||||
def test_services():
|
||||
"""Tes""
|
||||
print)
|
||||
|
||||
|
||||
try:
|
||||
response = requests.get("http://localhost:3000", timeout=5)
|
||||
|
||||
print("✅ Frontend React actif sur port 3000")
|
||||
se:
|
||||
print(f"❌ Frontend erreur: {response.status_code}")
|
||||
except:
|
||||
print("❌ Frontend inacces")
|
||||
|
||||
# Test backend
|
||||
try:
|
||||
response = requests.get("http://localhost:505)
|
||||
if response.status_code == 200:
|
||||
print("✅ Backend actif sur port 5000")
|
||||
else:
|
||||
print(f"❌ Backend erreur: {respons)
|
||||
except:
|
||||
print("❌ Backend ina000")
|
||||
|
||||
def test_files():
|
||||
"""Test des fichiers"""
|
||||
print("\n🔍 Test ")
|
||||
|
||||
[
|
||||
"frontend/src/components/Documenta
|
||||
"frontend/src/services/Docum
|
||||
"frontend/src/data/tooltion.ts",
|
||||
|
||||
"frontend/src/components/PropertiesPanel/index.tsx"
|
||||
]
|
||||
|
||||
for file_path in files_to_check:
|
||||
full_pa
|
||||
if full_path.exists():
|
||||
print(f"✅ {file_path}")
|
||||
se:
|
||||
print(f"❌ {file_path}")
|
||||
|
||||
def create_test_page():
|
||||
|
||||
print("\n🔍 Création de la page de test...")
|
||||
|
||||
html_content = '''<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; ma }
|
||||
}
|
||||
.result { padding: }
|
||||
.error { background: #f8d7da; c }
|
||||
.success { background: #d4edda; color: #14; }
|
||||
.info { background: #d1ecf1; color: #0c5460
|
||||
; }
|
||||
.instructions { backgroun0; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="contaer">
|
||||
<h1>🧪 Test Documentation - Visual Worder</h1>
|
||||
|
||||
<div class="error result">
|
||||
<us.
|
||||
ble.
|
||||
</div>
|
||||
|
||||
<div class="instructions">
|
||||
<h3>Instructions de test:</h3>
|
||||
<ol>
|
||||
<li>Ouvrez <a href="http://localhost:3000" target="_blank></li>
|
||||
<li>Créez un élément de workflow (glissez depuis latte)</li>
|
||||
/li>
|
||||
<li>Ouvrez F12 (outils développeur) → Console</li>
|
||||
<li>Copiez le script ci-dessous dans la console</li>
|
||||
<li>Appuyez sur Entrée</li>
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<h3>Script de diagnostic:</h3>
|
||||
<textarea readonly onclick="this.select()">
|
||||
// === DON ===
|
||||
console.log('🧪 DÉBUT DIAGNOSTIC DOCUMENTATION');
|
||||
|
||||
// Foncte
|
||||
function wait(ms) { return new Promise(resolve => setTimeout(
|
||||
|
||||
async function testDocumentation() {
|
||||
const...');
|
||||
|
||||
// Vérifier React
|
||||
if (typeof React !== 'unded') {
|
||||
console.log('✅ React chargé');
|
||||
} else {
|
||||
console.log('❌ React non c
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('\\n2. Recherche onglets...');
|
||||
|
||||
// Chercher tous les onglets possibles
|
||||
const tabs = document.querySelectorAll('[role="tab"], .MuiTab-root, [cl;
|
||||
console.log(`📑 ${tabs.length} onglets trouvés`);
|
||||
|
||||
let docTab = null;
|
||||
tabs.forEach((tab, i) => {
|
||||
|
||||
console.log(` ${i}: "${text}"`);
|
||||
|
||||
if (text.toLowerCase().inc
|
||||
text.toLowerCase().includes('help') ||
|
||||
text.toLowerCase().includes('aide')) {
|
||||
|
||||
console.log('✅ Onglet Drouvé!');
|
||||
}
|
||||
});
|
||||
|
||||
if (!docTab) {
|
||||
vé');
|
||||
return;
|
||||
}
|
||||
|
||||
cons;
|
||||
|
||||
|
||||
const activeBefore = docTab.getAttribute('aria-sel
|
||||
console.log(` Avant: ${activeBefore ? 'actif' : 'inactif'}`);
|
||||
|
||||
// C
|
||||
docTab.click();
|
||||
await wait(1000);
|
||||
|
||||
// État après
|
||||
const activeAfter = docTab.getAttribute('aria-selected') === 'true';
|
||||
console.log(` Après: ${activeAfter ? 'actif' ;
|
||||
|
||||
if (!activeAfter) {
|
||||
console.log('❌ PROBLÈME: Onglet ne);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('\\n4. Recherche contenu...');
|
||||
|
||||
// Chercher panneaux
|
||||
const panels = document.querySelectorAl;
|
||||
console.log(`📋 ${panels.length} patrouvés`);
|
||||
|
||||
let contentFound = false;
|
||||
panels.forEach((panel, i) => {
|
||||
cons!== null;
|
||||
const hasContent = panel.textContent.trim().leng> 0;
|
||||
console.log(` Panel ${i}: visible=${visi
|
||||
|
||||
|
||||
console.log('✅ VÉ!');
|
||||
;
|
||||
contentFound = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (!contentFound) {
|
||||
console.log('❌ PROBLÈME PRINCIPAL: Aucun contenu visible');
|
||||
|
||||
// Debug supplémentaire
|
||||
console.log('\\n🔍 Debug:');
|
||||
const docElements = document.querySelectorAll('[class*="documentation"]');
|
||||
console.h}`);
|
||||
|
||||
const errors = document.querySelecto');
|
||||
console.log(` Éléments erreur: ${errors.lengt);
|
||||
}
|
||||
|
||||
console.log(
|
||||
}
|
||||
|
||||
// Lancer le test
|
||||
testDocumentation().catch(console.error);
|
||||
xtarea>
|
||||
|
||||
<div class="info result">
|
||||
/h3>
|
||||
<ul>
|
||||
<li><strong>✅ "Onglet Documentation trouvé</li>
|
||||
<li><strong>Avant/Après clic</strong> →
|
||||
li>
|
||||
<li><strong>❌ "Pé</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="info result">
|
||||
|
||||
l>
|
||||
<li><strong>Si l'ong
|
||||
<li><strong>Si l'onglet s'active mais pas de>
|
||||
<li><strong>Si erreurs JavaScript:</strong></li>
|
||||
<li><strong>Si aucun onglet trouvé:</strong> Problème d'li>
|
||||
ul>
|
||||
</div>
|
||||
|
||||
<div class="success result">
|
||||
<h3>Après le test:</h3>
|
||||
blème.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>'''
|
||||
|
||||
# Sauvegarder
|
||||
html_filml")
|
||||
html_file.write_text(html_content)
|
||||
print(f"✅ Page de test créée: {html_file}")
|
||||
|
||||
return html_file
|
||||
|
||||
def main():
|
||||
")
|
||||
" * 60)
|
||||
|
||||
test_services()
|
||||
|
||||
html_file = create_test)
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
prinÉ")
|
||||
print("=" * 60)
|
||||
print(f"✅ Page de test créée: {html_file}")
|
||||
print("\n📋 PROCHAINES ÉTAPES:")
|
||||
prineur")
|
||||
print("2")
|
||||
print("3. Exécutez le script dans la 2")
|
||||
print("4. Copiez les résultats pour analyse")
|
||||
|
||||
if __name__ __":
|
||||
main()
|
||||
Reference in New Issue
Block a user