mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-30 21:50:32 +01:00
35 lines
1 KiB
JavaScript
35 lines
1 KiB
JavaScript
var config = require("../../config/specs");
|
|
var helper = require("../helper");
|
|
|
|
|
|
describe("map", function() {
|
|
describe.skip("zoom level", function() {
|
|
it("via url", function() {
|
|
var zoomLevel = "12.37"
|
|
browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
|
"geojson:example"
|
|
])+"#"+zoomLevel+"/41.3805/2.1635");
|
|
browser.alertAccept();
|
|
|
|
browser.waitUntil(function () {
|
|
return (
|
|
browser.isVisible(".mapboxgl-ctrl-zoom")
|
|
&& browser.getText(".mapboxgl-ctrl-zoom") === "Zoom level: "+(zoomLevel)
|
|
);
|
|
}, 10*1000)
|
|
})
|
|
it("via map controls", function() {
|
|
var zoomLevel = 12.37;
|
|
browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
|
"geojson:example"
|
|
])+"#"+zoomLevel+"/41.3805/2.1635");
|
|
browser.alertAccept();
|
|
|
|
browser.click(".mapboxgl-ctrl-zoom-in")
|
|
browser.waitUntil(function () {
|
|
var text = browser.getText(".mapboxgl-ctrl-zoom")
|
|
return text === "Zoom level: "+(zoomLevel+1);
|
|
}, 10*1000)
|
|
})
|
|
})
|
|
})
|