From 06e13f4dd8248fd372e2f6e590850f05f0e420c7 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Wed, 24 Jul 2024 11:00:11 +0700 Subject: [PATCH] Spix, will you behave? --- scripts/build-for-linux.sh | 2 +- src/qml/qgismobileapp.qml | 7 ++++++- test/spix/smoke_test.py | 2 +- test/testdata/projection_dataset.gpkg | Bin 225280 -> 225280 bytes 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/build-for-linux.sh b/scripts/build-for-linux.sh index b8c40b4f8e..070c4bbc55 100755 --- a/scripts/build-for-linux.sh +++ b/scripts/build-for-linux.sh @@ -1,4 +1,4 @@ #!/bin/bash -cmake -S . -B $(git rev-parse --show-toplevel)/build-x64-linux -GNinja -DWITH_VCPKG=ON -DENABLE_TESTS=ON +cmake -S . -B $(git rev-parse --show-toplevel)/build-x64-linux -GNinja -DWITH_VCPKG=ON -DWITH_SPIX=ON -DENABLE_TESTS=ON cmake --build $(git rev-parse --show-toplevel)/build-x64-linux diff --git a/src/qml/qgismobileapp.qml b/src/qml/qgismobileapp.qml index b103d4f358..7f2d049f9d 100644 --- a/src/qml/qgismobileapp.qml +++ b/src/qml/qgismobileapp.qml @@ -3936,7 +3936,8 @@ ApplicationWindow { QFieldGuide { id: mapCanvasTour baseRoot: mainWindow - objectName: "QFieldGuideMapCanvasTour" + objectName: 'mapCanvasTour' + steps: [{ "title": qsTr("Menu"), "description": qsTr("You can open dashboard here to interact with the project's legends and map theme, or start digitizing by activating the editing mode. Long-pressing the button also gives you immediate access to the main menu."), @@ -3963,4 +3964,8 @@ ApplicationWindow { settings.setValue("/QField/showMapCanvasGuide", false); } } + + function blockGuides() { + mapCanvasTour.blockGuide(); + } } diff --git a/test/spix/smoke_test.py b/test/spix/smoke_test.py index dc86e830ee..a64e795be2 100755 --- a/test/spix/smoke_test.py +++ b/test/spix/smoke_test.py @@ -110,7 +110,7 @@ def test_wms_layer(app, screenshot_path, screenshot_check, extra, process_alive) """ assert app.existsAndVisible("mainWindow") - app.invokeMethod("mainWindow/QFieldGuideMapCanvasTour", "blockGuide", []) + app.invokeMethod("mainWindow", "blockGuides", []) # Arbitrary wait period to insure project fully loaded and rendered time.sleep(4) diff --git a/test/testdata/projection_dataset.gpkg b/test/testdata/projection_dataset.gpkg index d773f8ee91ebeb4027bb63b9b22f0bcdfdc93c29..3b4b6d8da26be54ff8acb10cc4b58bc84067c95d 100644 GIT binary patch delta 57 zcmZp8z}xVES0*^nC$l6~AuYcsH?c&)m_dMnk&(ecL4kpRL4Bf(Gpjm-UR6P3N^1&Z MYYNlW6y`bk0N>6J^8f$< delta 57 zcmZp8z}xVES0*^nC$l6~AuYcsH?c&)m_dMniHX5ML4kpRL2aUpGpibdUbt6dN^1&Z MYYNlW6y`bk0NcY4ssI20