Skip to content

Commit

Permalink
Use wait_for_child for getting RunDialog in test
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Sep 30, 2024
1 parent e607feb commit bb7f4be
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit bb7f4be

Please sign in to comment.