Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
chrkaatz committed Oct 17, 2023
1 parent bce5b42 commit 520fe46
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ at [https://www.contributor-covenant.org/translations][translations].
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
[translations]: https://www.contributor-covenant.org/translations
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT_DE.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ Dieser Verhaltenskodex basiert auf dem [Contributor Covenant][homepage],
Version 2.0, verfügbar unter
<https://www.contributor-covenant.org/de/version/2/0/code-of-conduct>

[homepage]: https://www.contributor-covenant.org
[homepage]: https://www.contributor-covenant.org
28 changes: 27 additions & 1 deletion test/a11y/example.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,36 @@
import { test } from "@playwright/test"
import { chromium, Browser, Page } from "playwright"
import { injectAxe, checkA11y } from "axe-playwright"

let browser: Browser
let page: Page

test.describe("basic example a11y test", () => {
test("test start page", async ({ page }) => {
test.beforeAll(async () => {
browser = await chromium.launch()
page = await browser.newPage()
await page.goto("/")
await injectAxe(page)
})

// eslint-disable-next-line playwright/expect-expect
test("simple accessibility run", async () => {
await checkA11y(page)
})

// eslint-disable-next-line playwright/expect-expect
test("check a11y for the whole page and axe run options", async () => {
await checkA11y(page, undefined, {
axeOptions: {
runOnly: {
type: "tag",
values: ["wcag2a"],
},
},
})
})

test.afterAll(async () => {
await browser.close()
})
})

0 comments on commit 520fe46

Please sign in to comment.