Skip to content

Commit d7f739a

Browse files
committed
Add test coverage for offlined project (inc. data.gpkg and basemap.mbtiles)
1 parent 57135f9 commit d7f739a

File tree

7 files changed

+14158
-0
lines changed

7 files changed

+14158
-0
lines changed

test/spix/smoke_test.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,25 @@ def test_svg(app, screenshot_path, screenshot_check, extra, process_alive):
236236
assert screenshot_check("test_svg", "test_svg", 0.025)
237237

238238

239+
@pytest.mark.project_file("test_offline_project.qgs")
240+
def test_offline_project(app, screenshot_path, screenshot_check, extra, process_alive):
241+
"""
242+
Starts a test app and check if offlined data.gpkg alongside basemap.mbtiles render properly
243+
"""
244+
assert app.existsAndVisible("mainWindow")
245+
246+
# Arbitrary wait period to insure project fully loaded and rendered
247+
time.sleep(4)
248+
249+
app.takeScreenshot(
250+
"mainWindow", os.path.join(screenshot_path, "test_offline_project.png")
251+
)
252+
assert process_alive()
253+
extra.append(extras.html('<img src="images/test_offline_project.png"/>'))
254+
255+
assert screenshot_check("test_offline_project", "test_offline_project", 0.025)
256+
257+
239258
@pytest.mark.skipif(
240259
platform.system() != "Linux",
241260
reason="PostGIS test requires a docker linux container",

test/testdata/basemap.mbtiles

9.14 MB
Binary file not shown.
118 KB
Loading
118 KB
Loading
118 KB
Loading

test/testdata/data.gpkg

240 KB
Binary file not shown.

test/testdata/test_offline_project.qgs

Lines changed: 14139 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)