fix: serialize ready diagnostic close and exact native prompt handling

This commit is contained in:
阿白叔 committed 2026-11-17 04:20:05 +08:00
1 parent eaff46e50e
commit fd50805380
6 files changed
+233 -16

No files matched your search

+9
View File
@@ -15,6 +15,15 @@ from cbb_refresh_verify.dialog_rules import (
ASSETS = Path(__file__).resolve().parents[1] / "src" / "cbb_refresh_verify" / "assets"
def test_diagnostic_forward_prompt_is_observed_while_ordinary_verify_still_confirms():
text = 'New changes are ready for Forward Annotation. Do you want to Forward Annotate now?'
snapshot = prompt(text)
ordinary = decide(snapshot, load_rules(ASSETS/'dialog_rules.v1.json'))
diagnostic = decide(snapshot, load_rules(ASSETS/'dialog_rules.v1.json', diagnostic_only=True))
assert ordinary.action == 'confirm_forward_annotation'
assert diagnostic.category == 'OBSERVE_PROGRESS' and not diagnostic.action
def prompt(text, *, phase=DialogPhase.PCB_STARTING, window_class="#32770",
control_types=("Text", "Button")):
controls = tuple(