maputnik/test/functional/index.js
Filip Proborszcz e34c1ca4be 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).
2022-04-06 14:05:15 +02:00

46 lines
1.1 KiB
JavaScript

var config = require("../config/specs");
var helper = require("./helper");
var extendWebdriverIO = require("./util/webdriverio-ext");
describe('maputnik', function() {
before(async function(done) {
await extendWebdriverIO();
helper.startGeoserver(done);
});
after(function(done) {
helper.stopGeoserver(done);
});
beforeEach(async function() {
await browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
"geojson:example",
"raster:raster"
]));
await browser.acceptAlert();
await browser.execute(function() {
localStorage.setItem("survey", true);
});
const elem = await $(".maputnik-toolbar-link");
await elem.waitForExist();
await browser.flushReactUpdates();
});
// -------- setup --------
require("./util/coverage");
// -----------------------
// ---- All the tests ----
require("./history");
require("./layers");
require("./map");
require("./modals");
require("./screenshots");
require("./accessibility");
require("./keyboard");
// ------------------------
});