Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken test coverage for serving a site directly after generating it through the Graphical User Interface #1300

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading