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:
64
test_gui_quick.py
Executable file
64
test_gui_quick.py
Executable file
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Quick test of GUI initialization"""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
|
||||
# Fix Qt plugin conflict with OpenCV - must be done BEFORE any imports
|
||||
import os
|
||||
os.environ.pop('QT_QPA_PLATFORM_PLUGIN_PATH', None)
|
||||
|
||||
# Import PyQt5 BEFORE cv2 to avoid plugin conflicts
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from PyQt5.QtCore import Qt
|
||||
|
||||
# Now safe to import other modules
|
||||
from gui.main_window import MainWindow
|
||||
from gui.orchestrator import RPAOrchestrator
|
||||
|
||||
def test_orchestrator():
|
||||
"""Test orchestrator initialization"""
|
||||
print("Testing orchestrator...")
|
||||
orch = RPAOrchestrator()
|
||||
|
||||
# Test initialization
|
||||
success = orch.initialize_components()
|
||||
print(f" Components initialized: {success}")
|
||||
|
||||
# Test workflow retrieval
|
||||
workflows = orch.get_workflows()
|
||||
print(f" Workflows: {len(workflows)}")
|
||||
|
||||
print("✓ Orchestrator test passed")
|
||||
return True
|
||||
|
||||
def test_gui():
|
||||
"""Test GUI creation"""
|
||||
print("\nTesting GUI...")
|
||||
|
||||
# Use offscreen platform to avoid display issues
|
||||
os.environ['QT_QPA_PLATFORM'] = 'offscreen'
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
window = MainWindow()
|
||||
print(" Window created")
|
||||
print(f" Title: {window.windowTitle()}")
|
||||
print(f" Size: {window.width()}x{window.height()}")
|
||||
|
||||
# Test orchestrator connection
|
||||
print(f" Orchestrator connected: {window.orchestrator is not None}")
|
||||
|
||||
print("✓ GUI test passed")
|
||||
return True
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
test_orchestrator()
|
||||
test_gui()
|
||||
print("\n✓ All tests passed!")
|
||||
except Exception as e:
|
||||
print(f"\n✗ Test failed: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
Reference in New Issue
Block a user