Skip to content

Commit

Permalink
Merge pull request #188 from storybookjs/next
Browse files Browse the repository at this point in the history
Release 0.7.1
  • Loading branch information
yannbf committed Sep 6, 2022
2 parents bb36851 + ee31263 commit 12735ec
Show file tree
Hide file tree
Showing 3 changed files with 736 additions and 13 deletions.
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -488,7 +488,7 @@ You can use it for multiple use cases, and here's an example that combines the s
```js
// .storybook/test-runner.js
const { getStoryContext } = require('@storybook/test-runner');
const { injectAxe, checkA11y } = require('axe-playwright');
const { injectAxe, checkA11y, configureAxe } = require('axe-playwright');

module.exports = {
async preRender(page, context) {
Expand All @@ -503,6 +503,11 @@ module.exports = {
return;
}

// Apply story-level a11y rules
await configureAxe(page, {
rules: storyContext.parameters?.a11y?.config?.rules,
})

// from Storybook 7.0 onwards, the selector should be #storybook-root
await checkA11y(page, '#root', {
detailedReport: true,
Expand Down
11 changes: 7 additions & 4 deletions package.json
Expand Up @@ -58,10 +58,6 @@
"devDependencies": {
"@auto-it/released": "^10.37.1",
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.5",
"@babel/preset-typescript": "^7.13.0",
"@babel/template": "^7.14.5",
"@babel/types": "^7.14.8",
"@jest/types": "^28.1.3",
Expand Down Expand Up @@ -108,12 +104,18 @@
"icon": "https://user-images.githubusercontent.com/321738/63501763-88dbf600-c4cc-11e9-96cd-94adadc2fd72.png"
},
"dependencies": {
"@babel/core": "^7.18.13",
"@babel/generator": "^7.18.13",
"@babel/preset-env": "^7.18.10",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@storybook/core-common": "^6.5.0",
"@storybook/csf": "0.0.2--canary.4566f4d.1",
"@storybook/csf-tools": "^6.5.0",
"@storybook/store": "^6.5.0",
"can-bind-to-host": "^1.1.1",
"commander": "^9.0.0",
"expect-playwright": "^0.8.0",
"global": "^4.4.0",
"jest": "^28.0.0",
"jest-junit": "^14.0.0",
Expand All @@ -123,6 +125,7 @@
"jest-watch-typeahead": "^2.0.0",
"node-fetch": "^2",
"playwright": "^1.14.0",
"regenerator-runtime": "^0.13.9",
"semver": "^7.3.7",
"tempy": "^1.0.1",
"ts-dedent": "^2.0.0"
Expand Down

0 comments on commit 12735ec

Please sign in to comment.