Conversation
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟢 | Statements | 93.1% | 81/87 |
| 🟢 | Branches | 82.35% | 14/17 |
| 🟢 | Functions | 93.33% | 14/15 |
| 🟢 | Lines | 93.59% | 73/78 |
Test suite run success
16 tests passing in 5 suites.
Report generated by 🧪jest coverage report action from 3d2149c
| // Don't run middleware on API routes or Next.js build output | ||
| export const config = { | ||
| matcher: ["/((?!api|_next|.*\\..*).*)"], | ||
| matcher: ["/((?!api|_next|sitemap|.*\\..*).*)"], |
There was a problem hiding this comment.
Allows the atypical request to locahost:3000/sitemap.xml to resolve without being intercepted by Next middleware (so we can see this url in the browser)
Without this we get a 404 on the above url.
| }); | ||
|
|
||
| return appRoutes; | ||
| } |
There was a problem hiding this comment.
Pull all routes (that are a page.tsx ) - the actual route "path" is in between [locale] a page.tsx
IE:
/
/health
This will also work for Next nested routes if there are any.
| fi | ||
| done | ||
|
|
||
| echo -e "${GREEN}Server is ready after ~${WAIT_TIME} seconds.${NO_COLOR}" |
There was a problem hiding this comment.
CI script to wait for localhost:3000 - this kind of thing would be useful if you also needed to also wait for the API to load (if you have an e2e feature that you want to pa11y to test)
|
If we don't add a decision record it could be nice to at least update the README to explain what pa11y-ci is, how to run it, what it's checking for, in brief. |
lorenyu
left a comment
There was a problem hiding this comment.
My understanding from talking to you about this is that accessibility checks aren't specific to tech stack. If that's true, I'd like to look into putting this in template-infra instead of template-application-nextjs so that we can have accessibility checks regardless of which application template they use
There was a problem hiding this comment.
nit: type out the full name ("accessibility" rather than "a11y")
|
|
||
| jobs: | ||
| build: | ||
| name: Pa11y-ci tests |
There was a problem hiding this comment.
name the job based on what it's doing not the tool it's using e.g. "Accessibility" not "Pa11y"
| @@ -0,0 +1,63 @@ | |||
| name: Accessibility tests | |||

Ticket
Resolves #347
Changes
pa11y-cipackagecontext
Not sure if we want to document this in a decision record?
localhost:3000/sitemap.xml