Skip to content

Commit 6b51339

Browse files
authored
Remove axe plugin from chromatic in production (#3853)
* Only run axe when not taking snapshots
1 parent 80fd6f3 commit 6b51339

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.chromatic/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
builder: "storybook-builder-parcel",
55
},
66
stories: ['../packages/**/chromatic/**/*.chromatic.{js,jsx,ts,tsx}'],
7-
addons: [
7+
addons: process.env.NODE_ENV === 'production' ? [] : [
88
'@storybook/addon-actions',
99
'@storybook/addon-a11y'
1010
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"clean:icons": "babel-node --presets @babel/env ./scripts/cleanIcons.js",
3434
"postinstall": "yarn build:icons && patch-package",
3535
"plop": "plop --plopfile scripts/plopfile.js",
36-
"chromatic": "CHROMATIC=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic'",
36+
"chromatic": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic'",
3737
"merge:css": "babel-node --presets @babel/env ./scripts/merge-spectrum-css.js",
3838
"release": "lerna publish from-package --yes",
3939
"publish:nightly": "lerna publish -y --canary --preid nightly --dist-tag=nightly --exact --force-publish=* --no-push",

packages/@react-spectrum/table/chromatic/TableView.chromatic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const meta: Meta<SpectrumTableProps<object>> = {
5757
parameters: {
5858
chromaticProvider: {colorSchemes: ['light'], locales: ['en-US'], scales: ['medium'], disableAnimations: true},
5959
// large delay with the layout since there are so many tables
60-
chromatic: {delay: 2000}
60+
chromatic: {delay: 4000}
6161
}
6262
};
6363

packages/@react-spectrum/table/chromatic/TableViewRTL.chromatic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const meta: Meta = {
1818
parameters: {
1919
chromaticProvider: {colorSchemes: ['light'], locales: ['ar-AE'], scales: ['medium'], disableAnimations: true},
2020
// large delay with the layout since there are so many tables
21-
chromatic: {delay: 2000}
21+
chromatic: {delay: 4000}
2222
}
2323
};
2424

0 commit comments

Comments
 (0)