Skip to content

Commit e8dae00

Browse files
committed
install visual testing and a11y add-ons
1 parent 1553cc6 commit e8dae00

File tree

5 files changed

+171
-6
lines changed

5 files changed

+171
-6
lines changed

.storybook/main.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
/** @type { import('@storybook/svelte-vite').StorybookConfig } */
22
const config = {
33
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|svelte)'],
4-
addons: ['@storybook/addon-links', '@storybook/addon-docs', '@storybook/addon-vitest'],
4+
addons: [
5+
'@storybook/addon-links',
6+
'@storybook/addon-docs',
7+
'@storybook/addon-vitest',
8+
'@chromatic-com/storybook',
9+
'@storybook/addon-a11y'
10+
],
511
framework: {
612
name: '@storybook/svelte-vite',
713
options: {},

.storybook/preview.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const BOOTSTRAP_VIEWPORTS = {
5050
const preview = {
5151
parameters: {
5252
backgrounds: {},
53-
actions: { argTypesRegex: '^on[A-Z].*' },
53+
// actions: { argTypesRegex: '^on[A-Z].*' },
5454
controls: {
5555
matchers: {
5656
color: /(background|color)$/i,
@@ -64,9 +64,9 @@ const preview = {
6464

6565
initialGlobals: {
6666
backgrounds: {
67-
value: 'light'
68-
}
69-
}
67+
value: 'light',
68+
},
69+
},
7070
};
7171

7272
export default preview;

chromatic.config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"onlyChanged": true,
3+
"projectId": "Project:656a2bfa011def621f569319",
4+
"zip": true
5+
}

package-lock.json

Lines changed: 152 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build-storybook": "storybook build",
1313
"build-js": "vite build",
1414
"build": "vite build && storybook build -o dist/storybook && node ./build-redirects.js",
15-
"test-storybook": "test-storybook",
15+
"test-storybook": "vitest --project=storybook",
1616
"chromatic": "chromatic --exit-zero-on-changes",
1717
"babel": "vite build --watch --minify false"
1818
},
@@ -27,6 +27,8 @@
2727
},
2828
"homepage": "https://github.com/hathitrust/firebird-common#readme",
2929
"devDependencies": {
30+
"@chromatic-com/storybook": "^4.1.2",
31+
"@storybook/addon-a11y": "^9.1.16",
3032
"@storybook/addon-docs": "9.1.16",
3133
"@storybook/addon-links": "9.1.16",
3234
"@storybook/addon-vitest": "^9.1.16",

0 commit comments

Comments
 (0)