mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 15:21:20 +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).
51 lines
1.5 KiB
JavaScript
51 lines
1.5 KiB
JavaScript
var assert = require("assert");
|
|
var config = require("../../config/specs");
|
|
var helper = require("../helper");
|
|
var wd = require("../../wd-helper");
|
|
|
|
|
|
describe("skip links", function() {
|
|
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", async function() {
|
|
const selector = wd.$("root:skip:layer-list")
|
|
const elem = await $(selector);
|
|
assert(await elem.isExisting());
|
|
await browser.keys(['Tab']);
|
|
assert(await elem.isFocused());
|
|
await elem.click();
|
|
|
|
const targetEl = await $("#skip-target-layer-list");
|
|
assert(await targetEl.isFocused());
|
|
});
|
|
|
|
it("skip link to layer editor", async function() {
|
|
const selector = wd.$("root:skip:layer-editor")
|
|
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 = await $("#skip-target-layer-editor");
|
|
assert(await targetEl.isFocused());
|
|
});
|
|
|
|
it("skip link to map view", async function() {
|
|
const selector = wd.$("root:skip:map-view")
|
|
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 = await $(".mapboxgl-canvas");
|
|
assert(await targetEl.isFocused());
|
|
});
|
|
});
|