Skip to content

Commit

Permalink
Remove axe plugin from chromatic in production (#3853)
Browse files Browse the repository at this point in the history
* Only run axe when not taking snapshots
  • Loading branch information
snowystinger authored Dec 15, 2022
1 parent 80fd6f3 commit 6b51339
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .chromatic/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
builder: "storybook-builder-parcel",
},
stories: ['../packages/**/chromatic/**/*.chromatic.{js,jsx,ts,tsx}'],
addons: [
addons: process.env.NODE_ENV === 'production' ? [] : [
'@storybook/addon-actions',
'@storybook/addon-a11y'
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"clean:icons": "babel-node --presets @babel/env ./scripts/cleanIcons.js",
"postinstall": "yarn build:icons && patch-package",
"plop": "plop --plopfile scripts/plopfile.js",
"chromatic": "CHROMATIC=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic'",
"chromatic": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic'",
"merge:css": "babel-node --presets @babel/env ./scripts/merge-spectrum-css.js",
"release": "lerna publish from-package --yes",
"publish:nightly": "lerna publish -y --canary --preid nightly --dist-tag=nightly --exact --force-publish=* --no-push",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const meta: Meta<SpectrumTableProps<object>> = {
parameters: {
chromaticProvider: {colorSchemes: ['light'], locales: ['en-US'], scales: ['medium'], disableAnimations: true},
// large delay with the layout since there are so many tables
chromatic: {delay: 2000}
chromatic: {delay: 4000}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const meta: Meta = {
parameters: {
chromaticProvider: {colorSchemes: ['light'], locales: ['ar-AE'], scales: ['medium'], disableAnimations: true},
// large delay with the layout since there are so many tables
chromatic: {delay: 2000}
chromatic: {delay: 4000}
}
};

Expand Down

0 comments on commit 6b51339

Please sign in to comment.