2018-01-10 14:19:34 +01:00
|
|
|
var config = require("../../config/specs");
|
|
|
|
var helper = require("../helper");
|
|
|
|
|
|
|
|
|
|
|
|
describe("map", function() {
|
|
|
|
describe.skip("zoom level", function() {
|
2022-04-06 14:05:15 +02:00
|
|
|
it("via url", async function() {
|
2018-01-10 14:19:34 +01:00
|
|
|
var zoomLevel = "12.37"
|
2022-04-06 14:05:15 +02:00
|
|
|
await browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
2018-01-10 14:19:34 +01:00
|
|
|
"geojson:example"
|
|
|
|
])+"#"+zoomLevel+"/41.3805/2.1635");
|
2022-04-06 14:05:15 +02:00
|
|
|
await browser.alertAccept();
|
2018-01-10 14:19:34 +01:00
|
|
|
|
2022-04-06 14:05:15 +02:00
|
|
|
await browser.waitUntil(async function () {
|
2018-01-10 14:19:34 +01:00
|
|
|
return (
|
2023-08-29 04:17:49 +02:00
|
|
|
await browser.isVisible(".maplibregl-ctrl-zoom")
|
|
|
|
&& await browser.getText(".maplibregl-ctrl-zoom") === "Zoom level: "+(zoomLevel)
|
2018-01-10 14:19:34 +01:00
|
|
|
);
|
|
|
|
}, 10*1000)
|
|
|
|
})
|
2022-04-06 14:05:15 +02:00
|
|
|
it("via map controls", async function() {
|
2018-01-10 14:19:34 +01:00
|
|
|
var zoomLevel = 12.37;
|
2022-04-06 14:05:15 +02:00
|
|
|
await browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
2018-01-10 14:19:34 +01:00
|
|
|
"geojson:example"
|
|
|
|
])+"#"+zoomLevel+"/41.3805/2.1635");
|
2022-04-06 14:05:15 +02:00
|
|
|
await browser.alertAccept();
|
2018-01-10 14:19:34 +01:00
|
|
|
|
2023-08-29 04:17:49 +02:00
|
|
|
await browser.click(".maplibregl-ctrl-zoom-in")
|
2022-04-06 14:05:15 +02:00
|
|
|
await browser.waitUntil(async function () {
|
2023-08-29 04:17:49 +02:00
|
|
|
var text = await browser.getText(".maplibregl-ctrl-zoom")
|
2018-01-10 14:19:34 +01:00
|
|
|
return text === "Zoom level: "+(zoomLevel+1);
|
|
|
|
}, 10*1000)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|