Skip to content

Commit

Permalink
Take a screenshot of the loaded WMS project
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Sep 5, 2022
1 parent 7f00e7d commit 99b4c16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/spix/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,18 @@ def test_start_app(app, screenshot_path, extra, process_alive):


@pytest.mark.project_file("test_wms.qgz")
def test_message_logs(app, extra, process_alive):
def test_message_logs(app, screenshot_path, extra, process_alive):
"""
Starts a test app and check for message logs.
"""
assert app.existsAndVisible("mainWindow")

time.sleep(2)

app.takeScreenshot("mainWindow", os.path.join(screenshot_path, "test_wms.png"))
assert process_alive()
extra.append(extras.html('<img src="images/test_wms.png"/>'))

messagesCount = 0
for i in range(0, 10):
message = app.getStringProperty(
Expand Down

0 comments on commit 99b4c16

Please sign in to comment.