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

@@ -5,47 +5,47 @@ var wd = require("../../wd-helper");
describe("skip links", function() {
beforeEach(function () {
browser.url(config.baseUrl+"?debug&style="+helper.getGeoServerUrl("example-layer-style.json"));
browser.acceptAlert();
beforeEach(async function () {
await browser.url(config.baseUrl+"?debug&style="+helper.getGeoServerUrl("example-layer-style.json"));
await browser.acceptAlert();
});
it("skip link to layer list", function() {
it("skip link to layer list", async function() {
const selector = wd.$("root:skip:layer-list")
const elem = $(selector);
assert(elem.isExisting());
browser.keys(['Tab']);
assert(elem.isFocused());
elem.click();
const elem = await $(selector);
assert(await elem.isExisting());
await browser.keys(['Tab']);
assert(await elem.isFocused());
await elem.click();
const targetEl = $("#skip-target-layer-list");
assert(targetEl.isFocused());
const targetEl = await $("#skip-target-layer-list");
assert(await targetEl.isFocused());
});
it("skip link to layer editor", function() {
it("skip link to layer editor", async function() {
const selector = wd.$("root:skip:layer-editor")
const elem = $(selector);
assert(elem.isExisting());
browser.keys(['Tab']);
browser.keys(['Tab']);
assert(elem.isFocused());
elem.click();
const elem = await $(selector);
assert(await elem.isExisting());
await browser.keys(['Tab']);
await browser.keys(['Tab']);
assert(await elem.isFocused());
await elem.click();
const targetEl = $("#skip-target-layer-editor");
assert(targetEl.isFocused());
const targetEl = await $("#skip-target-layer-editor");
assert(await targetEl.isFocused());
});
it("skip link to map view", function() {
it("skip link to map view", async function() {
const selector = wd.$("root:skip:map-view")
const elem = $(selector);
assert(elem.isExisting());
browser.keys(['Tab']);
browser.keys(['Tab']);
browser.keys(['Tab']);
assert(elem.isFocused());
elem.click();
const elem = await $(selector);
assert(await elem.isExisting());
await browser.keys(['Tab']);
await browser.keys(['Tab']);
await browser.keys(['Tab']);
assert(await elem.isFocused());
await elem.click();
const targetEl = $(".mapboxgl-canvas");
assert(targetEl.isFocused());
const targetEl = await $(".mapboxgl-canvas");
assert(await targetEl.isFocused());
});
});