mirror of
https://github.com/maputnik/editor.git
synced 2026-07-09 15:37:28 +00:00
be9456d11b
## Launch Checklist Renames the e2e test and reduces changes as a preparation step from playwright in the following PR: - #1988 This is to keep as much history as possible. <img width="1907" height="933" alt="image" src="https://github.com/user-attachments/assets/b52075b3-eb3b-45dc-93dc-8c5e9cfd35dd" /> - [x] Briefly describe the changes in this PR. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import { MaputnikDriver } from "./maputnik-driver";
|
|
|
|
const test = it;
|
|
|
|
describe("accessibility", () => {
|
|
const { beforeAndAfter, get, when, then } = new MaputnikDriver();
|
|
beforeAndAfter();
|
|
|
|
describe("skip links", () => {
|
|
beforeEach(() => {
|
|
when.setStyle("layer");
|
|
});
|
|
|
|
test("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();
|
|
});
|
|
|
|
test("skip link to layer editor", () => {
|
|
const selector = "root:skip:layer-editor";
|
|
then(get.elementByTestId(selector)).shouldExist();
|
|
then(get.elementByTestId("skip-target-layer-editor")).shouldExist();
|
|
when.tab().tab();
|
|
then(get.elementByTestId(selector)).shouldBeFocused();
|
|
when.click(selector);
|
|
then(get.skipTargetLayerEditor()).shouldBeFocused();
|
|
});
|
|
|
|
test("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();
|
|
});
|
|
});
|
|
});
|