You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/csf/csf-next.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -404,7 +404,7 @@ All of the story properties are now contained within a new property called `comp
404
404
405
405
**4. Update your Vitest setup file**
406
406
407
-
If you're using [Storybook's Vitest addon](../../writing-tests/integrations/vitest-addon.mdx), you can remove your Vitest setup file (`.storybook/vitest.setup.ts`).
407
+
If you're using [Storybook's Vitest addon](../../writing-tests/integrations/vitest-addon/index.mdx), you can remove your Vitest setup file (`.storybook/vitest.setup.ts`).
408
408
409
409
If you are using [portable stories in Vitest](../portable-stories/portable-stories-vitest.mdx), you may use a Vitest setup file to configure your stories. This file must be updated to use the new CSF Next format.
410
410
@@ -431,7 +431,7 @@ import { setProjectAnnotations } from '@storybook/your-framework';
431
431
432
432
**5. Reusing stories in test files**
433
433
434
-
[Storybook's Vitest addon](../../writing-tests/integrations/vitest-addon.mdx) allows you to test your components directly inside Storybook. All the stories are automatically turned into Vitest tests, making integration seamless in your testing suite.
434
+
[Storybook's Vitest addon](../../writing-tests/integrations/vitest-addon/index.mdx) allows you to test your components directly inside Storybook. All the stories are automatically turned into Vitest tests, making integration seamless in your testing suite.
435
435
436
436
If you cannot use Storybook Test, you can still reuse the stories in your test files using [portable stories](../portable-stories/portable-stories-vitest.mdx). In prior story formats, you had to compose the stories before rendering them in your test files. With CSF Next, you can now reuse the stories directly.
Copy file name to clipboardExpand all lines: docs/api/portable-stories/portable-stories-vitest.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ sidebar:
27
27
28
28
<Ifrenderer={['react', 'vue', 'svelte']}>
29
29
<Calloutvariant="warning">
30
-
Storybook now recommends testing your stories in Vitest with the [Vitest addon](../../writing-tests/integrations/vitest-addon.mdx), which automatically transforms stories into real Vitest tests (using this API under the hood).
30
+
Storybook now recommends testing your stories in Vitest with the [Vitest addon](../../writing-tests/integrations/vitest-addon/index.mdx), which automatically transforms stories into real Vitest tests (using this API under the hood).
31
31
32
32
This API is still available for those who prefer to use portable stories directly, but we recommend using the Vitest addon for a more streamlined testing experience.
* Package manager information (e.g., `npm`, `yarn`).
44
44
* Monorepo information (e.g., [NX](https://nx.dev/), [Turborepo](https://turborepo.org/)).
45
-
* In-app events (e.g., [Storybook guided tour](https://github.com/storybookjs/addon-onboarding), [UI test run](../writing-tests/integrations/vitest-addon.mdx#storybook-ui)).
45
+
* In-app events (e.g., [Storybook guided tour](https://github.com/storybookjs/addon-onboarding), [UI test run](../writing-tests/integrations/vitest-addon/index.mdx#storybook-ui)).
46
46
47
47
Access to the raw data is highly controlled, limited to select members of Storybook's core team who maintain the telemetry. We cannot identify individual users from the dataset: it is anonymized and untraceable back to the user.
Copy file name to clipboardExpand all lines: docs/get-started/install.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ If you're experienced with Storybook, you can skip the onboarding to get a minim
103
103
104
104
Storybook will ask what type of configuration you want to install:
105
105
106
-
***Recommended**: Includes component development, [documentation](../writing-docs/autodocs.mdx), [testing](../writing-tests/integrations/vitest-addon.mdx), and [accessibility](../writing-tests/accessibility-testing.mdx) features
106
+
***Recommended**: Includes component development, [documentation](../writing-docs/autodocs.mdx), [testing](../writing-tests/integrations/vitest-addon/index.mdx), and [accessibility](../writing-tests/accessibility-testing.mdx) features
107
107
***Minimal**: Just the essentials for component development
108
108
109
109
You can also manually select these features using the `--features` flag. For example:
Copy file name to clipboardExpand all lines: docs/releases/migration-guide-from-older-version.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,7 @@ In addition to the automigrations and manual migrations above, there are also op
157
157
158
158
### `test-runner` to `addon-vitest`
159
159
160
-
`addon-vitest` and the rest of the [Storybook Test experience](https://storybook.js.org/blog/storybook-test-sneak-peek/) is designed to supercede the `test-runner`. It's faster and provides a better experience for writing and running tests. If your project uses React, Vue, or Svelte and is built with Vite, you should consider migrating to `addon-vitest`, by following the [installation instructions](../writing-tests/integrations/vitest-addon.mdx#automatic-setup).
160
+
`addon-vitest` and the rest of the [Storybook Test experience](https://storybook.js.org/blog/storybook-test-sneak-peek/) is designed to supercede the `test-runner`. It's faster and provides a better experience for writing and running tests. If your project uses React, Vue, or Svelte and is built with Vite, you should consider migrating to `addon-vitest`, by following the [installation instructions](../writing-tests/integrations/vitest-addon/index.mdx#automatic-setup).
Copy file name to clipboardExpand all lines: docs/releases/migration-guide.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,4 +97,4 @@ In addition to the automigrations and manual migrations above, there are also op
97
97
98
98
### `test-runner` to `addon-vitest`
99
99
100
-
`addon-vitest` and the rest of the [Storybook Test experience](https://storybook.js.org/blog/storybook-test-sneak-peek/) is designed to supercede the `test-runner`. It's faster and provides a better experience for writing and running tests. If your project uses React, Vue, or Svelte and is built with Vite, you should consider migrating to `addon-vitest`, by following the [installation instructions](../writing-tests/integrations/vitest-addon.mdx#automatic-setup).
100
+
`addon-vitest` and the rest of the [Storybook Test experience](https://storybook.js.org/blog/storybook-test-sneak-peek/) is designed to supercede the `test-runner`. It's faster and provides a better experience for writing and running tests. If your project uses React, Vue, or Svelte and is built with Vite, you should consider migrating to `addon-vitest`, by following the [installation instructions](../writing-tests/integrations/vitest-addon/index.mdx#automatic-setup).
|`dev`| Yes | Stories tagged with `dev` are rendered in Storybook's sidebar. |
17
-
|`test`| Yes | Stories tagged with `test` are included in [test runner](../writing-tests/integrations/test-runner.mdx#run-tests-for-a-subset-of-stories) or [Vitest addon](../writing-tests/integrations/vitest-addon.mdx#including-excluding-or-skipping-tests) runs. |
17
+
|`test`| Yes | Stories tagged with `test` are included in [test runner](../writing-tests/integrations/test-runner.mdx#run-tests-for-a-subset-of-stories) or [Vitest addon](../writing-tests/integrations/vitest-addon/index.mdx#including-excluding-or-skipping-tests) runs. |
18
18
|`autodocs`| No | Stories tagged with `autodocs` are included in the [docs page](../writing-docs/autodocs.mdx). If a CSF file does not contain at least one story tagged with `autodocs`, that component will not generate a docs page. |
19
19
|`play-fn`| No | Applied automatically to stories with a [play function](./play-function.mdx) defined. |
20
20
|`test-fn`| No | Applied automatically to tests defined using the [experimental `.test` method on CSF Factories](https://github.com/storybookjs/storybook/discussions/30119). |
Copy file name to clipboardExpand all lines: docs/writing-tests/accessibility-testing.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Your Storybook will now include some features to check the accessibility of your
35
35
36
36
### Integration with Vitest addon
37
37
38
-
The accessibility addon is designed to integrate with the [Vitest addon](./integrations/vitest-addon.mdx), so that you can [run accessibility tests](#run-accessibility-tests) alongside your component tests.
38
+
The accessibility addon is designed to integrate with the [Vitest addon](./integrations/vitest-addon/index.mdx), so that you can [run accessibility tests](#run-accessibility-tests) alongside your component tests.
39
39
40
40
**Automatic configuration:**
41
41
@@ -147,7 +147,7 @@ You can also enable, disable, or configure individual rules. This can be done in
147
147
148
148
### Test behavior
149
149
150
-
You can configure accessibility tests with the `parameters.a11y.test`[parameter](../writing-stories/parameters.mdx), which determines the behavior of accessibility tests for a story when run with either the [Vitest addon](./integrations/vitest-addon.mdx) or the [test-runner](./integrations/test-runner.mdx). The parameter accepts three values:
150
+
You can configure accessibility tests with the `parameters.a11y.test`[parameter](../writing-stories/parameters.mdx), which determines the behavior of accessibility tests for a story when run with either the [Vitest addon](./integrations/vitest-addon/index.mdx) or the [test-runner](./integrations/test-runner.mdx). The parameter accepts three values:
@@ -197,10 +197,10 @@ When you disable automated accessibility checks, the addon will not run any test
197
197
198
198
### With the Vitest addon
199
199
200
-
If you're using the [Vitest addon](./integrations/vitest-addon.mdx), you can run your accessibility tests, as part of component tests, in these ways:
200
+
If you're using the [Vitest addon](./integrations/vitest-addon/index.mdx), you can run your accessibility tests, as part of component tests, in these ways:
201
201
202
-
-[In the Storybook UI](./integrations/vitest-addon.mdx#storybook-ui)
203
-
-[In CI environments](./integrations/vitest-addon.mdx#in-ci)
202
+
-[In the Storybook UI](./integrations/vitest-addon/index.mdx#storybook-ui)
203
+
-[In CI environments](./integrations/vitest-addon/index.mdx#in-ci)
204
204
205
205
To run accessibility tests in the Storybook UI, first expand the testing widget in the sidebar and check the Accessibility checkbox. Now, when you press the Run component tests button, the accessibility tests will be run along with any other tests you have configured.
206
206
@@ -267,7 +267,7 @@ Browser-based accessibility tests, like those found in Storybook, evaluate the r
267
267
268
268
### Why are my tests failing in different environments?
269
269
270
-
With the [Vitest addon](./integrations/vitest-addon.mdx), your tests run in Vitest using your project's configuration with Playwright's Chromium browser. This can lead to inconsistent test results reported in the Storybook UI or CLI. The inconsistency can be due to `axe-core` reporting different results in different environments, such as browser versions or configurations. If you encounter this issue, we recommend reaching out using the default communication channels (e.g., [GitHub discussions](https://github.com/storybookjs/storybook/discussions/new?category=help), [Github issues](https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml)).
270
+
With the [Vitest addon](./integrations/vitest-addon/index.mdx), your tests run in Vitest using your project's configuration with Playwright's Chromium browser. This can lead to inconsistent test results reported in the Storybook UI or CLI. The inconsistency can be due to `axe-core` reporting different results in different environments, such as browser versions or configurations. If you encounter this issue, we recommend reaching out using the default communication channels (e.g., [GitHub discussions](https://github.com/storybookjs/storybook/discussions/new?category=help), [Github issues](https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml)).
271
271
272
272
### The addon panel does not show expected violations
273
273
@@ -281,7 +281,7 @@ To enable this feature flag, add the following configuration to your `.storybook
281
281
282
282
**More testing resources**
283
283
284
-
*[Vitest addon](./integrations/vitest-addon.mdx) for running tests in Storybook
284
+
*[Vitest addon](./integrations/vitest-addon/index.mdx) for running tests in Storybook
285
285
*[Interaction testing](./interaction-testing.mdx) for user behavior simulation
286
286
*[Visual testing](./visual-testing.mdx) for appearance
287
287
*[Snapshot testing](./snapshot-testing.mdx) for rendering errors and warnings
Copy file name to clipboardExpand all lines: docs/writing-tests/in-ci.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ sidebar:
6
6
title: In CI
7
7
---
8
8
9
-
The [Vitest addon](./integrations/vitest-addon.mdx) is great for automating your UI tests within Storybook. To have full confidence in your work, backed by tests, you need to run those automated tests in your continuous integration (CI) environment.
9
+
The [Vitest addon](./integrations/vitest-addon/index.mdx) is great for automating your UI tests within Storybook. To have full confidence in your work, backed by tests, you need to run those automated tests in your continuous integration (CI) environment.
Finally, we update the plugin configuration to use that environment variable in the [`storybookUrl` plugin option](./integrations/vitest-addon.mdx#storybookurl).
332
+
Finally, we update the plugin configuration to use that environment variable in the [`storybookUrl` plugin option](./integrations/vitest-addon/index.mdx#storybookurl).
333
333
334
334
{/* prettier-ignore-start */}
335
335
@@ -447,7 +447,7 @@ The workflow would then look like:
447
447
448
448
**More testing resources**
449
449
450
-
* [Vitest addon](./integrations/vitest-addon.mdx) for running tests in Storybook
450
+
* [Vitest addon](./integrations/vitest-addon/index.mdx) for running tests in Storybook
451
451
* [Interaction testing](./interaction-testing.mdx) for user behavior simulation
452
452
* [Accessibility testing](./accessibility-testing.mdx) for accessibility
453
453
* [Visual testing](./visual-testing.mdx) for appearance
0 commit comments