mirror of
https://github.com/maputnik/editor.git
synced 2025-12-29 01:20:01 +00:00
Use node 16.x
It required converting mocha tests code into async since [@wdio/sync is deprecated](https://webdriver.io/docs/sync-vs-async/) starting with node v16. It removed the dependency on fibers and on [node-gyp + python](https:// webdriver.io/docs/sync-vs-async/#common-issues-in-sync-mode) indirectly though which is a great thing. Also moved away from node-sass to sass since [node-sass is deprecated] (https://sass-lang.com/blog/libsass-is-deprecated).
This commit is contained in:
@@ -4,30 +4,30 @@ var helper = require("../helper");
|
||||
|
||||
describe("map", function() {
|
||||
describe.skip("zoom level", function() {
|
||||
it("via url", function() {
|
||||
it("via url", async function() {
|
||||
var zoomLevel = "12.37"
|
||||
browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
||||
await browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
||||
"geojson:example"
|
||||
])+"#"+zoomLevel+"/41.3805/2.1635");
|
||||
browser.alertAccept();
|
||||
await browser.alertAccept();
|
||||
|
||||
browser.waitUntil(function () {
|
||||
await browser.waitUntil(async function () {
|
||||
return (
|
||||
browser.isVisible(".mapboxgl-ctrl-zoom")
|
||||
&& browser.getText(".mapboxgl-ctrl-zoom") === "Zoom level: "+(zoomLevel)
|
||||
await browser.isVisible(".mapboxgl-ctrl-zoom")
|
||||
&& await browser.getText(".mapboxgl-ctrl-zoom") === "Zoom level: "+(zoomLevel)
|
||||
);
|
||||
}, 10*1000)
|
||||
})
|
||||
it("via map controls", function() {
|
||||
it("via map controls", async function() {
|
||||
var zoomLevel = 12.37;
|
||||
browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
||||
await browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
||||
"geojson:example"
|
||||
])+"#"+zoomLevel+"/41.3805/2.1635");
|
||||
browser.alertAccept();
|
||||
await browser.alertAccept();
|
||||
|
||||
browser.click(".mapboxgl-ctrl-zoom-in")
|
||||
browser.waitUntil(function () {
|
||||
var text = browser.getText(".mapboxgl-ctrl-zoom")
|
||||
await browser.click(".mapboxgl-ctrl-zoom-in")
|
||||
await browser.waitUntil(async function () {
|
||||
var text = await browser.getText(".mapboxgl-ctrl-zoom")
|
||||
return text === "Zoom level: "+(zoomLevel+1);
|
||||
}, 10*1000)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user