Adds axe-storybook-testing

This commit is contained in:
Josh Perez 2021-04-06 13:12:33 -07:00 committed by GitHub
parent 86cb7c97be
commit d6bb8ae35e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1871 additions and 3 deletions

View file

@ -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';
@ -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(