summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative_location_core/tst_plugin.qml
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-10-12 17:27:15 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-10-26 13:37:19 +0200
commit5ae82c3de980137b5afb66ddc065218a4e8d194d (patch)
treedb4de85556c45043db4ffe171c30baf20660b0c5 /tests/auto/declarative_location_core/tst_plugin.qml
parentf6a45d0ab38464f97dd74d01340f35feecdc61ba (diff)
Disable Esri/Nokia/MapBox pluginslts-6.2
As a first step, put them behind feature flags that are always false. Remove mapbox-gl-native as a submodule - there's no reason why people wanting to build that can't clone and build that repo themselves. Don't test the respective providers unless they are available, and use the osm plugin when testing the basic plugin framework. Change-Id: I53429878e53294dce52ee830a4b4613f372898c6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 1fa828b7aba04fa0c2449b490894ddb409a4e2d9) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/declarative_location_core/tst_plugin.qml')
-rw-r--r--tests/auto/declarative_location_core/tst_plugin.qml43
1 files changed, 23 insertions, 20 deletions
diff --git a/tests/auto/declarative_location_core/tst_plugin.qml b/tests/auto/declarative_location_core/tst_plugin.qml
index 869c61d6..3b0f4279 100644
--- a/tests/auto/declarative_location_core/tst_plugin.qml
+++ b/tests/auto/declarative_location_core/tst_plugin.qml
@@ -33,7 +33,7 @@ import QtLocation
Item {
Plugin { id: unattachedPlugin }
- Plugin { id: herePlugin; name: "here"}
+ Plugin { id: osmPlugin; name: "osm"}
Plugin { id: invalidPlugin; name: "invalid"; allowExperimental: true }
Plugin { id: testPlugin;
name: "qmlgeo.test.plugin"
@@ -79,11 +79,11 @@ Item {
verify(testPlugin.supportsRouting())
}
- if (invalidPlugin.availableServiceProviders.indexOf('here')) {
- verify(herePlugin.isAttached)
- verify(herePlugin.supportsMapping(Plugin.OnlineMappingFeature))
- verify(herePlugin.supportsGeocoding(Plugin.OnlineGeocodingFeature))
- verify(herePlugin.supportsRouting(Plugin.OnlineRoutingFeature))
+ if (invalidPlugin.availableServiceProviders.indexOf('osm') > -1) {
+ verify(osmPlugin.isAttached)
+ verify(osmPlugin.supportsMapping(Plugin.OnlineMappingFeature))
+ verify(osmPlugin.supportsGeocoding(Plugin.OnlineGeocodingFeature))
+ verify(osmPlugin.supportsRouting(Plugin.OnlineRoutingFeature))
}
verify(!unattachedPlugin.isAttached)
@@ -92,7 +92,8 @@ Item {
invalidAttachedSpy.clear()
compare(invalidAttachedSpy.count, 0)
invalidPlugin.name = 'qmlgeo.test.plugin'
- tryCompare(invalidAttachedSpy, 'count', 1)
+ let expectedAttachedSpy = 1
+ tryCompare(invalidAttachedSpy, 'count', expectedAttachedSpy)
verify(invalidPlugin.isAttached)
verify(invalidPlugin.supportsMapping())
@@ -100,14 +101,16 @@ Item {
verify(invalidPlugin.supportsRouting())
verify(invalidPlugin.supportsPlaces())
- invalidPlugin.name = 'here'
- compare(invalidAttachedSpy.count, 2)
- verify(invalidPlugin.supportsMapping(Plugin.OnlineMappingFeature))
- verify(invalidPlugin.supportsGeocoding(Plugin.OnlineGeocodingFeature))
- verify(invalidPlugin.supportsRouting(Plugin.OnlineRoutingFeature))
+ if (invalidPlugin.availableServiceProviders.indexOf('osm') > -1) {
+ invalidPlugin.name = 'osm'
+ compare(invalidAttachedSpy.count, ++expectedAttachedSpy)
+ verify(invalidPlugin.supportsMapping(Plugin.OnlineMappingFeature))
+ verify(invalidPlugin.supportsGeocoding(Plugin.OnlineGeocodingFeature))
+ verify(invalidPlugin.supportsRouting(Plugin.OnlineRoutingFeature))
+ }
invalidPlugin.name = ''
- compare(invalidAttachedSpy.count, 2)
+ compare(invalidAttachedSpy.count, expectedAttachedSpy)
verify(!invalidPlugin.supportsMapping())
verify(!invalidPlugin.supportsGeocoding())
verify(!invalidPlugin.supportsRouting())
@@ -132,19 +135,19 @@ Item {
}
function test_locale() {
- compare(herePlugin.locales, [Qt.locale().name]);
+ compare(osmPlugin.locales, [Qt.locale().name]);
//try assignment of a single locale
- herePlugin.locales = "fr_FR";
- compare(herePlugin.locales, ["fr_FR"]);
+ osmPlugin.locales = "fr_FR";
+ compare(osmPlugin.locales, ["fr_FR"]);
//try assignment of multiple locales
- herePlugin.locales = ["fr_FR","en_US"];
- compare(herePlugin.locales, ["fr_FR","en_US"]);
+ osmPlugin.locales = ["fr_FR","en_US"];
+ compare(osmPlugin.locales, ["fr_FR","en_US"]);
//check that assignment of empty locale list defaults to system locale
- herePlugin.locales = [];
- compare(herePlugin.locales, [Qt.locale().name]);
+ osmPlugin.locales = [];
+ compare(osmPlugin.locales, [Qt.locale().name]);
}
}
}