Skip to content

Commit

Permalink
Adds axe-storybook-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-signal committed Apr 6, 2021
1 parent 86cb7c9 commit d6bb8ae
Show file tree
Hide file tree
Showing 5 changed files with 1,895 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -38,3 +38,4 @@ sticker-creator/**/*.js
sticker-creator/dist/*

/.idea
/storybook-static/
8 changes: 7 additions & 1 deletion .storybook/config.js
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only

import * as React from 'react';
import { addDecorator, configure } from '@storybook/react';
import { addDecorator, addParameters, configure } from '@storybook/react';
import { withKnobs, boolean, optionsKnob } from '@storybook/addon-knobs';
import classnames from 'classnames';
import * as styles from './styles.scss';
Expand Down Expand Up @@ -126,6 +126,12 @@ addDecorator(Story => <Story />);

addDecorator(story => <I18n messages={messages}>{story()}</I18n>);

addParameters({
axe: {
disabledRules: ['html-has-lang'],
},
});

configure(() => {
// Load main app stories
const tsComponentsContext = require.context(
Expand Down
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -46,6 +46,7 @@
"dev:webpack": "cross-env NODE_ENV=development webpack-dev-server --hot",
"dev:typed-scss": "yarn build:typed-scss -w",
"dev:storybook": "cross-env SIGNAL_ENV=storybook start-storybook -p 6006 -s ./",
"storybook:axe": "build-storybook && axe-storybook",
"build": "run-s --print-label build:grunt build:typed-scss build:webpack build:release build:zip",
"build:acknowledgments": "node scripts/generate-acknowledgments.js",
"build:dev": "run-s --print-label build:grunt build:typed-scss build:webpack",
Expand Down Expand Up @@ -164,6 +165,7 @@
"@babel/plugin-transform-runtime": "7.8.3",
"@babel/preset-react": "7.7.4",
"@babel/preset-typescript": "7.7.7",
"@chanzuckerberg/axe-storybook-testing": "3.0.1",
"@storybook/addon-actions": "5.1.11",
"@storybook/addon-knobs": "5.1.11",
"@storybook/addons": "5.1.11",
Expand Down Expand Up @@ -262,6 +264,7 @@
"snyk": "1.316.1",
"spectron": "5.0.0",
"style-loader": "1.0.0",
"ts-dedent": "2.0.0",
"ts-loader": "4.1.0",
"ts-node": "8.3.0",
"typed-scss-modules": "0.0.11",
Expand Down

0 comments on commit d6bb8ae

Please sign in to comment.