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:
Filip Proborszcz
2022-04-06 14:05:15 +02:00
parent 87745f1fc9
commit e34c1ca4be
14 changed files with 8441 additions and 8219 deletions

View File

@@ -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 --------