maputnik/test/functional/map/index.js

36 lines
1 KiB
JavaScript
Raw Normal View History

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() {
it("via url", function() {
var zoomLevel = "12.37"
browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
"geojson:example"
])+"#"+zoomLevel+"/41.3805/2.1635");
2018-10-29 11:16:27 +01:00
browser.alertAccept();
2018-01-10 14:19:34 +01:00
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");
2018-10-29 11:16:27 +01:00
browser.alertAccept();
2018-01-10 14:19:34 +01:00
browser.click(".mapboxgl-ctrl-zoom-in")
browser.waitUntil(function () {
var text = browser.getText(".mapboxgl-ctrl-zoom")
return text === "Zoom level: "+(zoomLevel+1);
}, 10*1000)
})
})
})