mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 07:30:00 +00:00
It's apparently forced now to use the eslint.config.js instead of .eslintrc It got more strict with requiring the underscore on unused vars like `catch(_err)` , but that was all Closes #1012 Closes #995 Closes #992 ## Launch Checklist <!-- Thanks for the PR! Feel free to add or remove items from the checklist. --> - [ ] Briefly describe the changes in this PR. - [ ] Link to related issues. - [ ] Include before/after visuals or gifs if this PR includes visual changes. - [ ] Write tests for all new functionality. - [ ] Add an entry to `CHANGELOG.md` under the `## main` section.
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
import { MaputnikDriver } from "./maputnik-driver";
|
|
|
|
describe("accessibility", () => {
|
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
|
beforeAndAfter();
|
|
|
|
describe("skip links", () => {
|
|
beforeEach(() => {
|
|
when.setStyle("layer");
|
|
});
|
|
|
|
it("skip link to layer list", () => {
|
|
const selector = "root:skip:layer-list";
|
|
then(get.elementByTestId(selector)).shouldExist();
|
|
when.tab();
|
|
then(get.elementByTestId(selector)).shouldBeFocused();
|
|
when.click(selector);
|
|
then(get.skipTargetLayerList()).shouldBeFocused();
|
|
});
|
|
|
|
// This fails for some reason only in Chrome, but passes in firefox. Adding a skip here to allow merge and later on we'll decide if we want to fix this or not.
|
|
it.skip("skip link to layer editor", () => {
|
|
const selector = "root:skip:layer-editor";
|
|
then(get.elementByTestId(selector)).shouldExist();
|
|
when.tab().tab();
|
|
then(get.elementByTestId(selector)).shouldBeFocused();
|
|
when.click(selector);
|
|
then(get.skipTargetLayerEditor()).shouldBeFocused();
|
|
});
|
|
|
|
it("skip link to map view", () => {
|
|
const selector = "root:skip:map-view";
|
|
then(get.elementByTestId(selector)).shouldExist();
|
|
when.tab().tab().tab();
|
|
then(get.elementByTestId(selector)).shouldBeFocused();
|
|
when.click(selector);
|
|
then(get.canvas()).shouldBeFocused();
|
|
});
|
|
});
|
|
});
|