fix: preserve native error precedence over integration-panel closure

This commit is contained in:
阿白叔 committed 2026-11-17 01:58:47 +08:00
1 parent 7c27f9604e
commit 2149e71b67
2 files changed
+19 -16

No files matched your search

+3 -1
View File
@@ -267,7 +267,7 @@ def test_completed_integration_panel_only_closes_its_exact_close_control(phase):
assert decision.postcondition=='window_gone' and not decision.error_code
@pytest.mark.parametrize('fault',['pending','missing','duplicate','partial','foreign','unowned','disabled','early'])
@pytest.mark.parametrize('fault',['pending','missing','duplicate','partial','foreign','unowned','disabled','early','error'])
def test_integration_panel_without_complete_owned_idle_proof_never_closes(fault):
from dataclasses import replace
panel=completed_integration_panel()
@@ -279,4 +279,6 @@ def test_integration_panel_without_complete_owned_idle_proof_never_closes(fault)
elif fault=='unowned': panel=replace(panel,owner_hwnd=0)
elif fault=='disabled': panel=replace(panel,controls=(replace(panel.controls[0],enabled=False),*panel.controls[1:]))
elif fault=='early': panel=replace(panel,phase=DialogPhase.DOCUMENT_ATTACH)
elif fault=='error': panel=replace(panel,controls=(*panel.controls,
ControlSnapshot(handle=500,control_id=500,class_name='Static',name='There were errors during Project Integration.')))
assert decide(panel,load_rules(ASSETS/'dialog_rules.v1.json')).action!='close_completed_integration'