-
-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is basically the content of #841 with the code review changes and relevant fixes to tests/driver code to pass the tests. CC: @ShellyDCMS After this we should lint the project and add the lint to the CI to make sure it doesn't break. --------- Co-authored-by: ShellyDCMS <[email protected]> Co-authored-by: shelly_goldblit <[email protected]>
- Loading branch information
1 parent
f219ff1
commit 4d1e2e6
Showing
19 changed files
with
4,957 additions
and
5,849 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
import driver from "./driver"; | ||
import MaputnikDriver from "./driver"; | ||
|
||
describe("accessibility", () => { | ||
// skipped due to the following issue with cypress: https://github.com/cypress-io/cypress/issues/299 | ||
describe.skip("skip links", () => { | ||
let { beforeAndAfter, given, when, get, should } = new MaputnikDriver(); | ||
beforeAndAfter(); | ||
|
||
describe("skip links", () => { | ||
beforeEach(() => { | ||
driver.beforeEach(); | ||
driver.setStyle("layer"); | ||
when.setStyle("layer"); | ||
}); | ||
|
||
it("skip link to layer list", () => { | ||
const selector = driver.getDataAttribute("root:skip:layer-list"); | ||
driver.isExists(selector); | ||
driver.typeKeys('{tab}'); | ||
driver.isFocused(selector); | ||
driver.click(selector); | ||
|
||
driver.isFocused("#skip-target-layer-list"); | ||
const selector = "root:skip:layer-list"; | ||
should.exist(selector); | ||
when.tab(); | ||
should.beFocused(selector); | ||
when.click(selector); | ||
should.beFocused("skip-target-layer-list"); | ||
}); | ||
it("skip link to layer editor", () => { | ||
const selector = driver.getDataAttribute("root:skip:layer-editor"); | ||
driver.isExists(selector); | ||
driver.typeKeys('{tab}{tab}'); | ||
driver.isFocused(selector); | ||
driver.click(selector); | ||
|
||
driver.isFocused("#skip-target-layer-editor"); | ||
|
||
// 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"; | ||
should.exist(selector); | ||
when.tab().tab(); | ||
should.beFocused(selector); | ||
when.click(selector); | ||
should.beFocused("skip-target-layer-editor"); | ||
}); | ||
|
||
it("skip link to map view", () => { | ||
const selector = driver.getDataAttribute("root:skip:map-view"); | ||
driver.isExists(selector); | ||
driver.typeKeys('{tab}{tab}{tab}'); | ||
driver.isFocused(selector); | ||
driver.click(selector); | ||
|
||
driver.isFocused(".maplibregl-canvas"); | ||
const selector = "root:skip:map-view"; | ||
should.exist(selector); | ||
when.tab().tab().tab(); | ||
should.beFocused(selector); | ||
when.click(selector); | ||
should.canvasBeFocused(); | ||
}); | ||
}); | ||
}) | ||
}); | ||
}); |
Oops, something went wrong.