Skip to content

Commit

Permalink
Merge pull request #30128 from storybookjs/yann/fix-addon-test-docs
Browse files Browse the repository at this point in the history
Addon Test: Fix documentation links
  • Loading branch information
yannbf authored Dec 23, 2024
2 parents ef9ee27 + 2b512d6 commit 12cac39
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions code/addons/test/src/postinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ export default async function postInstall(options: PostinstallOptions) {
reasons.push(
dedent`
Please check the documentation for more information about its requirements and installation:
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/vitest-plugin`)}
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/test-addon`)}
`
);
} else {
reasons.push(
dedent`
Fear not, however, you can follow the manual installation process instead at:
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/vitest-plugin#manual`)}
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/test-addon#manual-setup`)}
`
);
}
Expand Down Expand Up @@ -308,7 +308,7 @@ export default async function postInstall(options: PostinstallOptions) {
${colors.gray(vitestSetupFile)}
Please refer to the documentation to complete the setup manually:
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/vitest-plugin#manual`)}
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/test-addon#manual-setup`)}
`
);
logger.line(1);
Expand Down Expand Up @@ -368,7 +368,7 @@ export default async function postInstall(options: PostinstallOptions) {
your existing workspace file automatically, you must do it yourself. This was the last step.
Please refer to the documentation to complete the setup manually:
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/vitest-plugin#manual`)}
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/test-addon#manual-setup`)}
`
);
logger.line(1);
Expand All @@ -390,7 +390,7 @@ export default async function postInstall(options: PostinstallOptions) {
your existing workspace file automatically, you must do it yourself. This was the last step.
Please refer to the documentation to complete the setup manually:
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/vitest-plugin#manual`)}
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/test-addon#manual-setup`)}
`
);
logger.line(1);
Expand All @@ -416,14 +416,14 @@ export default async function postInstall(options: PostinstallOptions) {
import { defineWorkspace } from 'vitest/config';
import { storybookTest } from '@storybook/experimental-addon-test/vitest-plugin';${vitestInfo.frameworkPluginImport}
// More info at: https://storybook.js.org/docs/writing-tests/vitest-plugin
// More info at: https://storybook.js.org/docs/writing-tests/test-addon
export default defineWorkspace([
'${relative(dirname(browserWorkspaceFile), rootConfig)}',
{
extends: '${viteConfigFile ? relative(dirname(browserWorkspaceFile), viteConfigFile) : ''}',
plugins: [
// The plugin will run tests for the stories defined in your Storybook config
// See options at: https://storybook.js.org/docs/writing-tests/vitest-plugin#storybooktest
// See options at: https://storybook.js.org/docs/writing-tests/test-addon#storybooktest
storybookTest({ configDir: '${options.configDir}' }),${vitestInfo.frameworkPluginDocs + vitestInfo.frameworkPluginCall}
],
test: {
Expand Down Expand Up @@ -456,11 +456,11 @@ export default async function postInstall(options: PostinstallOptions) {
import { defineConfig } from 'vitest/config';
import { storybookTest } from '@storybook/experimental-addon-test/vitest-plugin';${vitestInfo.frameworkPluginImport}
// More info at: https://storybook.js.org/docs/writing-tests/vitest-plugin
// More info at: https://storybook.js.org/docs/writing-tests/test-addon
export default defineConfig({
plugins: [
// The plugin will run tests for the stories defined in your Storybook config
// See options at: https://storybook.js.org/docs/writing-tests/vitest-plugin#storybooktest
// See options at: https://storybook.js.org/docs/writing-tests/test-addon#storybooktest
storybookTest({ configDir: '${options.configDir}' }),${vitestInfo.frameworkPluginDocs + vitestInfo.frameworkPluginCall}
],
test: {
Expand Down Expand Up @@ -490,7 +490,7 @@ export default async function postInstall(options: PostinstallOptions) {
• When using the Vitest extension in your editor, all of your stories will be shown as tests!
Check the documentation for more information about its features and options at:
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/vitest-plugin`)}
${picocolors.cyan(`https://storybook.js.org/docs/writing-tests/test-addon`)}
`
);
logger.line(1);
Expand Down

0 comments on commit 12cac39

Please sign in to comment.