Skip to content

Commit

Permalink
Fix broken test coverage for serving a site directly after generating…
Browse files Browse the repository at this point in the history
… it through the Graphical User Interface
  • Loading branch information
bartfeenstra committed Feb 24, 2024
1 parent 742f4c3 commit 00be6dd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions betty/tests/gui/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pathlib import Path

import aiofiles
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import QFileDialog
from pytest_mock import MockerFixture
from pytestqt.qtbot import QtBot
Expand Down Expand Up @@ -225,11 +224,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)


Expand Down

0 comments on commit 00be6dd

Please sign in to comment.