mirror of
https://github.com/maputnik/editor.git
synced 2026-03-30 22:20:02 +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:
@@ -1,11 +1,12 @@
|
||||
var config = require("../config/specs");
|
||||
var helper = require("./helper");
|
||||
var extendWebdriverIO = require("./util/webdriverio-ext");
|
||||
|
||||
|
||||
describe('maputnik', function() {
|
||||
|
||||
before(function(done) {
|
||||
require("./util/webdriverio-ext");
|
||||
before(async function(done) {
|
||||
await extendWebdriverIO();
|
||||
helper.startGeoserver(done);
|
||||
});
|
||||
|
||||
@@ -13,18 +14,18 @@ describe('maputnik', function() {
|
||||
helper.stopGeoserver(done);
|
||||
});
|
||||
|
||||
beforeEach(function() {
|
||||
browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
||||
beforeEach(async function() {
|
||||
await browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
||||
"geojson:example",
|
||||
"raster:raster"
|
||||
]));
|
||||
browser.acceptAlert();
|
||||
browser.execute(function() {
|
||||
await browser.acceptAlert();
|
||||
await browser.execute(function() {
|
||||
localStorage.setItem("survey", true);
|
||||
});
|
||||
const elem = $(".maputnik-toolbar-link");
|
||||
elem.waitForExist();
|
||||
browser.flushReactUpdates();
|
||||
const elem = await $(".maputnik-toolbar-link");
|
||||
await elem.waitForExist();
|
||||
await browser.flushReactUpdates();
|
||||
});
|
||||
|
||||
// -------- setup --------
|
||||
|
||||
Reference in New Issue
Block a user