refactor: move batch plans above project execution details

This commit is contained in:
阿白叔 committed 2026-10-14 22:54:23 +08:00
1 parent ae7e0e6a1b
commit 10581df3e2
2 files changed
+26 -7

No files matched your search

+20
View File
@@ -121,3 +121,23 @@ def test_project_plan_exposes_bom_import_and_template_actions(qtbot, tmp_path):
assert window.findChild(QPushButton, 'exportBomTemplate').text() == 'BOM 模板'
assert not window.task_list.filter.isVisible()
window.close(); store.close()
def test_batch_rules_and_target_plan_are_above_project_summary(qtbot, tmp_path):
from dx_productivity.trial_task_center.service import TaskCenterService
from dx_productivity.trial_task_center.store import TaskStore
from dx_productivity.trial_task_center.logging_setup import configure_logging
from dx_productivity.trial_task_center.ui.main_window import TrialTaskCenterWindow
root = tmp_path / 'projects'; root.mkdir()
path = root / 'board.prj'; path.write_text('KEY FrontEndSnapshot "DxD"\nKEY iCDBDir "database"\n')
store = TaskStore(tmp_path / 'tasks.db')
service = TaskCenterService(store, configure_logging(tmp_path / 'data'))
task = service.create_project_tasks(root)[0]
window = TrialTaskCenterWindow(service); qtbot.addWidget(window); window.open_task(task.task_id); window.show()
qtbot.waitExposed(window)
assert window.mapping_tabs.objectName() == 'batchPlanTabs'
assert window.mapping_tabs.geometry().top() < window.project_summary.geometry().top()
assert window.mapping_tabs.tabText(0) == '本批料号规则'
assert window.mapping_tabs.tabText(1) == '本批位号计划'
window.close(); store.close()