File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change
1
+ const { injectAxe, checkA11y } = require ( "axe-playwright" ) ;
2
+
3
+ module . exports = {
4
+ async preVisit ( page ) {
5
+ await injectAxe ( page ) ;
6
+ } ,
7
+ async postVisit ( page ) {
8
+ await checkA11y ( page , "#storybook-root" , {
9
+ detailedReport : true ,
10
+ detailedReportOptions : {
11
+ html : true ,
12
+ } ,
13
+ } ) ;
14
+ } ,
15
+ } ;
Original file line number Diff line number Diff line change 30
30
"@types/react" : " ^18.0.28" ,
31
31
"@types/react-dom" : " ^18.0.11" ,
32
32
"@vitejs/plugin-react" : " ^4.0.0" ,
33
+ "axe-playwright" : " ^1.2.3" ,
33
34
"eslint" : " ^8.38.0" ,
34
35
"eslint-plugin-react" : " ^7.32.2" ,
35
36
"eslint-plugin-react-hooks" : " ^4.6.0" ,
Original file line number Diff line number Diff line change @@ -3551,11 +3551,28 @@ available-typed-arrays@^1.0.5:
3551
3551
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
3552
3552
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
3553
3553
3554
- axe-core@^4.2.0 :
3554
+ axe-core@^4.2.0, axe-core@^4.5.1 :
3555
3555
version "4.8.3"
3556
3556
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.8.3.tgz#205df863dd9917d5979e9435dab4d47692759051"
3557
3557
integrity sha512-d5ZQHPSPkF9Tw+yfyDcRoUOc4g/8UloJJe5J8m4L5+c7AtDdjDLRxew/knnI4CxvtdxEUVgWz4x3OIQUIFiMfw==
3558
3558
3559
+ axe-html-reporter@2.2.3 :
3560
+ version "2.2.3"
3561
+ resolved "https://registry.yarnpkg.com/axe-html-reporter/-/axe-html-reporter-2.2.3.tgz#2d56e239fe9bd1f09ba0735d94596bf79dd389a7"
3562
+ integrity sha512-io8aCEt4fJvv43W+33n3zEa8rdplH5Ti2v5fOnth3GBKLhLHarNs7jj46xGfpnGnpaNrz23/tXPHC3HbwTzwwA==
3563
+ dependencies :
3564
+ mustache "^4.0.1"
3565
+ rimraf "^3.0.2"
3566
+
3567
+ axe-playwright@^1.2.3 :
3568
+ version "1.2.3"
3569
+ resolved "https://registry.yarnpkg.com/axe-playwright/-/axe-playwright-1.2.3.tgz#b590b4edf3898ed5784c4932cbad2937115b31f2"
3570
+ integrity sha512-bTxCTNp3kx6sQRMjmuLv8pG3+v+kOCvFXATim1+XUXzW6ykulbbuJdQfgB+vQPNAF9uvYbW2qrv9pg81ZSFV/A==
3571
+ dependencies :
3572
+ axe-core "^4.5.1"
3573
+ axe-html-reporter "2.2.3"
3574
+ picocolors "^1.0.0"
3575
+
3559
3576
axios@^1.6.1 :
3560
3577
version "1.6.2"
3561
3578
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2"
@@ -7099,6 +7116,11 @@ msw@^1.2.1:
7099
7116
type-fest "^2.19.0"
7100
7117
yargs "^17.3.1"
7101
7118
7119
+ mustache@^4.0.1 :
7120
+ version "4.2.0"
7121
+ resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64"
7122
+ integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==
7123
+
7102
7124
mute-stream@0.0.8 :
7103
7125
version "0.0.8"
7104
7126
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
You can’t perform that action at this time.
0 commit comments