-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kan-pawes
committed
Nov 27, 2024
1 parent
19ac12d
commit b27b8ed
Showing
6 changed files
with
62 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ node_modules | |
/blob-report/ | ||
/playwright/.cache/ | ||
/.idea/ | ||
/playwright-for-uu.iml |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,33 +1,40 @@ | ||
// @ts-check | ||
const { test, expect } = require('@playwright/test'); | ||
const {test, expect} = require('@playwright/test'); | ||
const AxeBuilder = require('@axe-core/playwright').default; | ||
|
||
test('has title', async ({ page }) => { | ||
await page.goto('http://localhost:3000/'); | ||
await expect(page.locator('#root')).toMatchAriaSnapshot(` | ||
- heading "Eventyrbilder" [level=4] | ||
- textbox "Søk" | ||
- img "Bilde" | ||
- text: Tid | ||
- img "Bilde" | ||
- text: Noe glemt | ||
- img "Bilde" | ||
- text: Et forsøk | ||
- img "Bilde" | ||
- text: Uheldig | ||
- img "Bilde" | ||
- text: Fri | ||
- img "Bilde" | ||
- text: Nytt liv | ||
- img "Bilde" | ||
- text: Evner | ||
- img "Bilde" | ||
- text: Fly | ||
- img "Bilde" | ||
- text: Det første som faller | ||
test.describe('homepage', () => { // 2 | ||
test('has title', async ({page}) => { | ||
await page.goto('http://localhost:3000/'); | ||
await expect(page.locator('#root')).toMatchAriaSnapshot(` | ||
- heading "Eventyrbilder" [level=4] | ||
- textbox "Søk" | ||
- img "Bilde" | ||
- text: Tid | ||
- img "Bilde" | ||
- text: Noe glemt | ||
- img "Bilde" | ||
- text: Et forsøk | ||
- img "Bilde" | ||
- text: Uheldig | ||
- img "Bilde" | ||
- text: Fri | ||
- img "Bilde" | ||
- text: Nytt liv | ||
- img "Bilde" | ||
- text: Evner | ||
- img "Bilde" | ||
- text: Fly | ||
- img "Bilde" | ||
- text: Det første som faller | ||
`); | ||
}); | ||
}); | ||
|
||
|
||
test('should not have any automatically detectable accessibility issues', async ({page}) => { | ||
await page.goto('http://localhost:3000/'); | ||
|
||
// test('get started link', async ({ page }) => { | ||
// | ||
// | ||
// }); | ||
const accessibilityScanResults = await new AxeBuilder({page}).analyze(); | ||
|
||
expect(accessibilityScanResults.violations).toEqual([]); | ||
}); | ||
}); |