-
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.
Merge branch 'main' into DDFBRA-200-anonym-og-indlogget-bruger-kan-pr…
…ove-e-bog
- Loading branch information
Showing
13 changed files
with
2,212 additions
and
132 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Workflow name | ||
name: "Accessibility Test" | ||
|
||
# Event for the workflow | ||
on: push | ||
|
||
# List of jobs | ||
jobs: | ||
# Run interaction and accessibility tests | ||
accessibility: | ||
name: Accessibility tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
# Make sure the actual branch is checked out when running on pull requests. | ||
with: | ||
ref: ${{ github.head_ref }} | ||
fetch-depth: 0 # 👈 Required to retrieve git history | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Install Playwright | ||
run: npx playwright install --with-deps | ||
|
||
- name: Build Storybook | ||
run: yarn build-storybook --quiet | ||
|
||
- name: Serve Storybook and run tests | ||
run: | | ||
export FORCE_COLOR=1 | ||
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | ||
"npx http-server storybook-static --port 6006 --silent" \ | ||
"npx wait-on tcp:6006 && yarn test-storybook" |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { checkA11y, injectAxe } from "axe-playwright" | ||
|
||
module.exports = { | ||
async preVisit(page) { | ||
await injectAxe(page) | ||
}, | ||
async postVisit(page) { | ||
await checkA11y(page, "#storybook-root", { | ||
axeOptions: {}, | ||
detailedReport: true, | ||
detailedReportOptions: { | ||
html: true, | ||
}, | ||
verbose: true, | ||
}) | ||
}, | ||
} |
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
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
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
Oops, something went wrong.