From f5e1cb4261575081915dbec48f4942c32fe216ad Mon Sep 17 00:00:00 2001 From: Bart Feenstra Date: Wed, 21 Feb 2024 19:07:09 +0000 Subject: [PATCH] Fix broken test coverage for serving a site directly after generating it through the Graphical User Interface --- betty/tests/gui/test_project.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/betty/tests/gui/test_project.py b/betty/tests/gui/test_project.py index 79245cf7c..eea80a6d4 100644 --- a/betty/tests/gui/test_project.py +++ b/betty/tests/gui/test_project.py @@ -228,11 +228,9 @@ async def test_serve_button_should_open_serve_window( sut = _GenerateWindow(app) betty_qtbot.qtbot.addWidget(sut) - with betty_qtbot.qtbot.waitSignal(sut._thread.finished): - sut.show() - betty_qtbot.qtbot.mouseClick(sut._cancel_button, Qt.MouseButton.LeftButton) - - betty_qtbot.qtbot.mouseClick(sut._serve_button, Qt.MouseButton.LeftButton) + sut.show() + betty_qtbot.qtbot.waitSignal(sut._thread.finished).wait() + betty_qtbot.mouse_click(sut._serve_button) betty_qtbot.assert_window(ServeProjectWindow)