Skip to content

Commit

Permalink
Rename snippets
Browse files Browse the repository at this point in the history
- Remove superfluous `storybook-` prefix
- Formatting
  • Loading branch information
kylegach committed Aug 29, 2023
1 parent 1f89b84 commit aa5510a
Show file tree
Hide file tree
Showing 37 changed files with 36 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/snippets/common/test-runner-snapshot.js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export default {
expect(innerHTML).toMatchSnapshot();
},
};
```
```
2 changes: 1 addition & 1 deletion docs/snippets/common/test-runner-snapshot.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ const config: TestRunnerConfig = {
};

export default config;
```
```
18 changes: 9 additions & 9 deletions docs/writing-tests/accessibility-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ Run the following command to install the required dependencies.

<CodeSnippets
paths={[
'common/storybook-test-runner-axe-playwright.yarn.js.mdx',
'common/storybook-test-runner-axe-playwright.npm.js.mdx',
'common/storybook-test-runner-axe-playwright.pnpm.js.mdx',
'common/test-runner-axe-playwright.yarn.js.mdx',
'common/test-runner-axe-playwright.npm.js.mdx',
'common/test-runner-axe-playwright.pnpm.js.mdx',
]}
/>

Expand All @@ -196,8 +196,8 @@ Add a new [configuration file](./test-runner.md#test-hook-api-experimental) insi

<CodeSnippets
paths={[
'common/storybook-test-runner-a11y-config.js.mdx',
'common/storybook-test-runner-a11y-config.ts.mdx',
'common/test-runner-a11y-config.js.mdx',
'common/test-runner-a11y-config.ts.mdx',
]}
/>

Expand All @@ -223,8 +223,8 @@ The test runner provides [helper methods](./test-runner.md#helpers), allowing ac

<CodeSnippets
paths={[
'common/storybook-test-runner-a11y-configure.js.mdx',
'common/storybook-test-runner-a11y-configure.ts.mdx',
'common/test-runner-a11y-configure.js.mdx',
'common/test-runner-a11y-configure.ts.mdx',
]}
/>

Expand All @@ -238,8 +238,8 @@ Additionally, if you have already [disabled accessibility](#how-to-disable-a11y-

<CodeSnippets
paths={[
'common/storybook-test-runner-a11y-disable.js.mdx',
'common/storybook-test-runner-a11y-disable.ts.mdx',
'common/test-runner-a11y-disable.js.mdx',
'common/test-runner-a11y-disable.ts.mdx',
]}
/>

Expand Down
6 changes: 3 additions & 3 deletions docs/writing-tests/interaction-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ Storybook only runs the interaction test when you're viewing a story. Therefore,

<CodeSnippets
paths={[
'common/storybook-test-runner-execute.yarn.js.mdx',
'common/storybook-test-runner-execute.npm.js.mdx',
'common/storybook-test-runner-execute.pnpm.js.mdx',
'common/test-runner-execute.yarn.js.mdx',
'common/test-runner-execute.npm.js.mdx',
'common/test-runner-execute.pnpm.js.mdx',
]}
/>

Expand Down
6 changes: 3 additions & 3 deletions docs/writing-tests/test-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ Finally, open a new terminal window and run the test-runner with:

<CodeSnippets
paths={[
'common/storybook-test-runner-coverage.yarn.js.mdx',
'common/storybook-test-runner-coverage.npm.js.mdx',
'common/storybook-test-runner-coverage.pnpm.js.mdx',
'common/test-runner-coverage.yarn.js.mdx',
'common/test-runner-coverage.npm.js.mdx',
'common/test-runner-coverage.pnpm.js.mdx',
]}
/>

Expand Down
39 changes: 19 additions & 20 deletions docs/writing-tests/test-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Run the following command to install it.

<CodeSnippets
paths={[
'common/storybook-test-runner-install.yarn.js.mdx',
'common/storybook-test-runner-install.npm.js.mdx',
'common/storybook-test-runner-install.pnpm.js.mdx',
'common/test-runner-install.yarn.js.mdx',
'common/test-runner-install.npm.js.mdx',
'common/test-runner-install.pnpm.js.mdx',
]}
/>

Expand Down Expand Up @@ -62,9 +62,9 @@ Finally, open a new terminal window and run the test-runner with:

<CodeSnippets
paths={[
'common/storybook-test-runner-execute.yarn.js.mdx',
'common/storybook-test-runner-execute.npm.js.mdx',
'common/storybook-test-runner-execute.pnpm.js.mdx',
'common/test-runner-execute.yarn.js.mdx',
'common/test-runner-execute.npm.js.mdx',
'common/test-runner-execute.pnpm.js.mdx',
]}
/>

Expand Down Expand Up @@ -104,14 +104,13 @@ If you're already using any of those flags in your project, you should be able t
| `--shard [index/count]` | Requires CI. Splits the test suite execution into multiple machines <br/> `test-storybook --shard=1/8` |
| `--failOnConsole` | Makes tests fail on browser console errors<br/>`test-storybook --failOnConsole` |


<!-- prettier-ignore-start -->

<CodeSnippets
paths={[
'common/storybook-test-runner-execute-with-flags.yarn.js.mdx',
'common/storybook-test-runner-execute-with-flags.npm.js.mdx',
'common/storybook-test-runner-execute-with-flags.pnpm.js.mdx',
'common/test-runner-execute-with-flags.yarn.js.mdx',
'common/test-runner-execute-with-flags.npm.js.mdx',
'common/test-runner-execute-with-flags.pnpm.js.mdx',
]}
/>

Expand All @@ -125,10 +124,10 @@ By default, the test-runner assumes that you're running it against a locally ser

<CodeSnippets
paths={[
'common/storybook-test-runner-execute-with-url.yarn.js.mdx',
'common/storybook-test-runner-execute-with-url.npm.js.mdx',
'common/storybook-test-runner-execute-with-url.pnpm.js.mdx',
'common/storybook-test-runner-execute-with-url.env-var.js.mdx',
'common/test-runner-execute-with-url.yarn.js.mdx',
'common/test-runner-execute-with-url.npm.js.mdx',
'common/test-runner-execute-with-url.pnpm.js.mdx',
'common/test-runner-execute-with-url.env-var.js.mdx',
]}
/>

Expand All @@ -146,7 +145,7 @@ If you're publishing your Storybook with services such as [Vercel](https://verce

<CodeSnippets
paths={[
'common/storybook-test-runner-with-deploy-event-workflow.yml.mdx',
'common/test-runner-with-deploy-event-workflow.yml.mdx',
]}
/>

Expand All @@ -166,7 +165,7 @@ You can use your CI provider (for example, [GitHub Actions](https://github.com/f

<CodeSnippets
paths={[
'common/storybook-test-runner-local-build-workflow.yml.mdx',
'common/test-runner-local-build-workflow.yml.mdx',
]}
/>

Expand Down Expand Up @@ -217,8 +216,8 @@ To enable the hooks API, you'll need to add a new configuration file inside your

<CodeSnippets
paths={[
'common/storybook-test-runner-hooks-example.js.mdx',
'common/storybook-test-runner-hooks-example.ts.mdx',
'common/test-runner-hooks-example.js.mdx',
'common/test-runner-hooks-example.ts.mdx',
]}
/>

Expand Down Expand Up @@ -247,8 +246,8 @@ The test-runner exports a few helpers that can be used to make your tests more r

<CodeSnippets
paths={[
'common/storybook-test-runner-helper-function.js.mdx',
'common/storybook-test-runner-helper-function.ts.mdx',
'common/test-runner-helper-function.js.mdx',
'common/test-runner-helper-function.ts.mdx',
]}
/>

Expand Down

0 comments on commit aa5510a

Please sign in to comment.