fix: address defects found in frozen native acceptance

This commit is contained in:
阿白叔 committed 2026-11-12 11:33:44 +08:00
1 parent b86e4e315a
commit 42d0cebc54
15 files changed
+808 -50

No files matched your search

+25
View File
@@ -85,3 +85,28 @@ def test_later_management_invalidates_old_recovery_offer(qtbot, tmp_path, monkey
assert action.isEnabled()
window._invalidate_check_targets('test.lmc', ['Beta'])
assert not action.isEnabled() and not window._reimport_offers
def test_check_release_action_tracks_busy_and_retained_queue(qtbot, tmp_path, monkeypatch):
from test_ui_filters import load_window
from test_review326_queue_guidance import retain
from cbb_refresh_verify.verify_runner import VerifyResult
window = load_window(qtbot, tmp_path, monkeypatch,
verifier=lambda _: VerifyResult('FAIL', safe_to_continue=False))
window._run(['Beta'], maintenance=True)
qtbot.waitUntil(lambda: not window._icdb_active())
action = next(b for b in window.icdb_summary.buttons() if '释放' in b.text())
window.busy = True
window._update()
assert not action.isEnabled(), 'A normal native call cannot admit release yet'
retain(monkeypatch, window.mentor_lmc_path)
window._queue_wait_library = window.mentor_lmc_path
window._update()
assert action.isEnabled(), 'Retained-queue release must stay reachable'
opened = []
monkeypatch.setattr(window, 'check_library_release', lambda **kwargs: opened.append(kwargs))
action.click()
assert opened == [{'queued': True}]
window.busy = False
window._update()
assert action.isEnabled()