Skip to content

Commit

Permalink
Merge pull request #394 from storybookjs/refactor/rename-render-hooks…
Browse files Browse the repository at this point in the history
…-to-visit-hooks

Refactor: Rename "render" hooks to "visit" hooks
  • Loading branch information
yannbf committed Nov 17, 2023
2 parents f437e72 + e6df920 commit b6dc95f
Show file tree
Hide file tree
Showing 11 changed files with 269 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .storybook/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config: TestRunnerConfig = {
setup() {
expect.extend({ toMatchImageSnapshot });
},
async postRender(page, context) {
async postVisit(page, context) {
// Get entire context of a story, including parameters, args, argTypes, etc.
const { parameters } = await getStoryContext(page, context);

Expand Down
4 changes: 2 additions & 2 deletions MIGRATION.test-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [Storyshots x Test Runner Comparison table](#storyshots-x-test-runner-comparison-table)
- [Migration Steps](#migration-steps)
- [Replacing `@storybook/addon-storyshots` with `@storybook/test-runner`:](#replacing-storybookaddon-storyshots-with-storybooktest-runner)
- [Migrating storyshots features](#migrating-storyshots-features)
- [Migrating Storyshots features](#migrating-storyshots-features)
- [Smoke testing](#smoke-testing)
- [Accessibility testing](#accessibility-testing)
- [Image snapshot testing](#image-snapshot-testing)
Expand Down Expand Up @@ -135,7 +135,7 @@ import { getJestConfig } from '@storybook/test-runner';
const defaultConfig = getJestConfig();

const config = {
// The default configuration comes from @storybook/test-runner
// The default Jest configuration comes from @storybook/test-runner
...defaultConfig,
snapshotResolver: './snapshot-resolver.js',
};
Expand Down

0 comments on commit b6dc95f

Please sign in to comment.