fix: admit linked legacy ICDB projects and explain blocked actions

This commit is contained in:
阿白叔 committed 2026-11-03 13:51:05 +08:00
1 parent 5eac654c36
commit d36b6bcad0
8 files changed
+138 -18

No files matched your search

+14
View File
@@ -53,6 +53,8 @@ def test_blocked_library_recovery_view_is_filesystem_only_and_maintenance_only(q
assert window.visible_records()[0].name == 'IP101GR'
assert window.visible_records()[0].status == 'UNKNOWN'
assert '未确认' in window.status_label.text()
assert 'ICDB' in window.management_capability_label.text()
assert '会话' in window.add_button.toolTip()
window.select_visible_button.click()
assert window.icdb_repair_button.isEnabled()
assert not any(button.isEnabled() for button in (window.batch_button, window.selected_batch_button,
@@ -65,6 +67,18 @@ def test_blocked_library_recovery_view_is_filesystem_only_and_maintenance_only(q
assert len(calls) == 1 and calls[0].maintenance is True
def test_maintenance_summary_exposes_first_failure_reason(qtbot, tmp_path):
from cbb_refresh_verify.ui.main_window import MainWindow
from cbb_refresh_verify.verify_runner import VerifyResult
window = MainWindow(data_root=tmp_path)
qtbot.addWidget(window)
window._global_icdb_run = True
detail = 'MAINTENANCE_TARGET_UNCONFIRMED: PCB 引用与当前工程不一致'
window._batch_done(([VerifyResult('BLOCKED', stderr=detail, safe_to_continue=False)], tmp_path/'batch.log'))
assert detail in window.summary.text()
assert detail in window.status_label.text()
def test_safe_maintenance_reloads_authoritative_catalog_after_worker_finishes(qtbot, tmp_path, monkeypatch):
from cbb_refresh_verify.library_lock import LibraryLock, blocker_path, _owners, _guard
from cbb_refresh_verify.ui.main_window import MainWindow