mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-11-10 03:31:55 +01:00
e34c1ca4be
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).
46 lines
1.1 KiB
JavaScript
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");
|
|
// ------------------------
|
|
|
|
});
|
|
|