Skip to content

Commit

Permalink
Increase timeout for RunDialog opening in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Oct 1, 2024
1 parent 275db18 commit a5216de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/ert/ui_tests/gui/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def handle_dialog():

# The Run dialog opens, click show details and wait until done appears
# then click it
run_dialog = wait_for_child(gui, qtbot, RunDialog)
run_dialog = wait_for_child(gui, qtbot, RunDialog, timeout=10000)
qtbot.waitUntil(run_dialog.done_button.isVisible, timeout=200000)
qtbot.waitUntil(lambda: run_dialog._tab_widget.currentWidget() is not None)

Expand Down Expand Up @@ -411,9 +411,9 @@ def handle_add_dialog():
V = TypeVar("V")


def wait_for_child(gui, qtbot: QtBot, typ: Type[V], *args, **kwargs) -> V:
qtbot.waitUntil(lambda: gui.findChild(typ, *args, **kwargs) is not None)
return get_child(gui, typ, *args, **kwargs)
def wait_for_child(gui, qtbot: QtBot, typ: Type[V], timeout=5000, **kwargs) -> V:
qtbot.waitUntil(lambda: gui.findChild(typ) is not None, timeout=timeout)
return get_child(gui, typ, **kwargs)


def get_child(gui: QWidget, typ: Type[V], *args, **kwargs) -> V:
Expand Down

0 comments on commit a5216de

Please sign in to comment.