-
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-217-opdater-unilogin-integration-til-…
…at-bruge-seneste-stil-anvisninger
- Loading branch information
Showing
30 changed files
with
2,980 additions
and
123 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,4 @@ jobs: | |
run: yarn install --frozen-lockfile | ||
|
||
- name: Run unit tests | ||
run: yarn test:unit | ||
run: yarn test:unit:once |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { HydrationBoundary, dehydrate } from "@tanstack/react-query" | ||
import React from "react" | ||
|
||
import WorkPageLayout from "@/components/pages/workPageLayout/WorkPageLayout" | ||
import getQueryClient from "@/lib/getQueryClient" | ||
import { useGetMaterialQuery } from "@/lib/graphql/generated/fbi/graphql" | ||
|
||
function Page({ params: { id } }: { params: { id: string } }) { | ||
const queryClient = getQueryClient() | ||
|
||
const decodedWid = decodeURIComponent(id) | ||
|
||
queryClient.prefetchQuery({ | ||
queryKey: useGetMaterialQuery.getKey({ wid: decodedWid }), | ||
queryFn: useGetMaterialQuery.fetcher({ wid: decodedWid }), | ||
}) | ||
|
||
return ( | ||
<HydrationBoundary state={dehydrate(queryClient)}> | ||
<div> | ||
<WorkPageLayout wid={decodedWid} /> | ||
<pre>{JSON.stringify(id, null, 2)}</pre> | ||
Page | ||
</div> | ||
</HydrationBoundary> | ||
) | ||
} | ||
|
||
export default Page |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"use client" | ||
|
||
import { useQuery } from "@tanstack/react-query" | ||
import React from "react" | ||
|
||
import { useGetMaterialQuery } from "@/lib/graphql/generated/fbi/graphql" | ||
|
||
function WorkPageLayout({ wid }: { wid: string }) { | ||
const data = useQuery({ | ||
queryKey: useGetMaterialQuery.getKey({ wid }), | ||
queryFn: useGetMaterialQuery.fetcher({ wid }), | ||
}) | ||
|
||
return ( | ||
<div> | ||
<pre>{JSON.stringify({ data }, null, 2)}</pre> | ||
</div> | ||
) | ||
} | ||
|
||
export default WorkPageLayout |
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.