路由壳升级:TaskWorker 三信号 + main_router→main_view 迁移(54/54 smoke 通过)

This commit is contained in:
DXC
2026-06-16 18:23:38 +08:00
parent bd4263d2ca
commit 61bd8582e5
8 changed files with 86 additions and 55 deletions

View File

@ -3,8 +3,8 @@
三层冒烟端到端模块化新架构src/new/
Layer 1 service 单元execute_step1 在各种错误路径返回正确 dict
Layer 2 view offscreenStep1View UI 行为符合契约(不依赖 main_router
Layer 3 end-to-endMainRouter 创建 → 切到 step1 → 点击 → 日志验证
Layer 2 view offscreenStep1View UI 行为符合契约(不依赖 main_view
Layer 3 end-to-endMainView 创建 → 切到 step1 → 点击 → 日志验证
运行方式(项目根)::
@ -247,17 +247,17 @@ def smoke_view():
# =========================================================================
def smoke_e2e():
print("\n" + "=" * 70)
print("Layer 3 —— end-to-endMainRouter 路由 + TaskWorker 调度)")
print("Layer 3 —— end-to-endMainView 路由 + TaskWorker 调度)")
print("=" * 70)
from PyQt5.QtCore import QEventLoop, QTimer
from PyQt5.QtWidgets import QApplication
app = QApplication.instance() or QApplication(sys.argv)
from src.new.main_router import MainRouter, ROUTES
from src.new.main_view import MainView, ROUTES
win = MainRouter()
report("L3", "MainRouter 实例化成功", win is not None)
win = MainView()
report("L3", "MainView 实例化成功", win is not None)
report("L3", "ROUTES 共 13 条", len(ROUTES) == 13, f"实际={len(ROUTES)}")
report("L3", "nav_list 项数 == 13", win.nav_list.count() == 13,
f"count={win.nav_list.count()}")