File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,14 +86,14 @@ def test_clinical_preset_buttons_survive_settings_refresh(wizard, qtbot):
8686 updated = dict (step1 .clinical_presets )
8787 updated [preset_name ] = ["MDS-UPDRS" , "Y-BOCS-o" ]
8888 step1 ._on_presets_changed (updated )
89- qtbot . wait ( 50 )
90-
91- assert step1 .get_preset_button (preset_name ) is not None
92- assert step1 . preset_scroll_content . width () > 20
93- assert step1 . preset_scroll_area . height () > 10
94- long_name_btn = step1 . get_preset_button ( preset_name )
95- assert long_name_btn is not None
96- assert (
97- long_name_btn . minimumWidth ( )
98- >= long_name_btn . fontMetrics (). horizontalAdvance ( preset_name )
99- )
89+
90+ def strip_ready () -> bool :
91+ btn = step1 .get_preset_button (preset_name )
92+ return (
93+ btn is not None
94+ and btn . text () == preset_name
95+ and step1 . preset_scroll_content . width () > 20
96+ and step1 . preset_scroll_area . height () > 10
97+ )
98+
99+ qtbot . waitUntil ( strip_ready , timeout = 2000 )
You can’t perform that action at this time.
0 commit comments