From ca33dcaf3df559e0afa25f947b91f2382f2102f7 Mon Sep 17 00:00:00 2001 From: Eivind Jahren Date: Mon, 30 Sep 2024 13:48:23 +0200 Subject: [PATCH] Use wait_for_child for getting RunDialog in test --- tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py b/tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py index 964fce91759..34cf9201cb6 100644 --- a/tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py +++ b/tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py @@ -72,10 +72,8 @@ def _evaluate(coeffs, x): run_experiment = experiment_panel.findChild(QWidget, name="run_experiment") qtbot.mouseClick(run_experiment, Qt.MouseButton.LeftButton) - # The Run dialog opens, wait until done appears, then click done - qtbot.waitUntil(lambda: gui.findChild(RunDialog) is not None) - run_dialog = gui.findChild(RunDialog) - + # The Run dialog opens, wait until restart appears and the tab is ready + run_dialog = wait_for_child(gui, qtbot, RunDialog) qtbot.waitUntil(run_dialog.restart_button.isVisible, timeout=60000) qtbot.waitUntil(lambda: run_dialog._tab_widget.currentWidget() is not None)