-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: accessibility tests #194
Conversation
Tried with node 20.18.0 on Windows 11 with "yarn" + "yarn storybook", and then when storybook was running, "yarn test-storybook" in another terminal. Needed to install web browsers for testing first though, so "yarn playwright install" and then "yarn test-storybook" went through. All tests passed: All tests passed (Click to expand)
There were some warnings given by
See the "All tests passed (Click to expand)" for all the warnings. |
.storybook/test-runner.js
Outdated
await injectAxe(page); | ||
}, | ||
postRender: async (page) => { | ||
// after the story has been rendered rn AXE checksonly on root not the whole page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// after the story has been rendered rn AXE checksonly on root not the whole page | |
// after the story has been rendered, run AXE checks only on root, not the whole page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
public/mockServiceWorker.js
Outdated
const INTEGRITY_CHECKSUM = '3d6b9f06410d179a7f7404d4bf4c3c70' | ||
const activeClientIds = new Set() | ||
const INTEGRITY_CHECKSUM = '3d6b9f06410d179a7f7404d4bf4c3c70'; | ||
const activeClientIds = new Set(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file starts with:
/* eslint-disable */
/* tslint:disable */
/**
* Mock Service Worker (1.2.3).
* @see https://github.com/mswjs/msw
* - Please do NOT modify this file.
* - Please do NOT serve this file on production.
*/
This file should probably be completely ignored by prettier also so it doesn't try to change anything in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
fixed the jest warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok otherwise, only the jest-haste-map warnings still at the beginning of "test-storybook"'s output i.e.
$ yarn test-storybook
yarn run v1.22.22
$ test-storybook
jest-haste-map: duplicate manual mock found: articles.mock.d
The following files share their name; please delete one of them:
* <rootDir>\dist\src\core\archiveSearchPageContent\__mocks__\articles.mock.d.ts
* <rootDir>\dist\cjs\src\core\archiveSearchPageContent\__mocks__\articles.mock.d.ts
jest-haste-map: duplicate manual mock found: categories.mock.d
The following files share their name; please delete one of them:
* <rootDir>\dist\src\core\archiveSearchPageContent\__mocks__\categories.mock.d.ts
* <rootDir>\dist\cjs\src\core\archiveSearchPageContent\__mocks__\categories.mock.d.ts
...
"yarn build" + "yarn storybook" in one terminal, then "yarn test-storybook" -> jest-haste-map warnings went away. So basically "yarn build" helped with removing the jest-haste-map warnings when running the storybook tests. |
Description
Issues
Closes
HCRC-123:
Related
Testing
Automated tests
Manual testing
Screenshots
Additional notes