Skip to content

Commit

Permalink
docs: replace postRender(deprecated) with postVisit
Browse files Browse the repository at this point in the history
  • Loading branch information
junkisai committed Dec 21, 2023
1 parent 6624c5e commit fc078cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ You can access its context in a test hook like so:
import { TestRunnerConfig, getStoryContext } from '@storybook/test-runner';

const config: TestRunnerConfig = {
async postRender(page, context) {
async postVisit(page, context) {
// Get entire context of a story, including parameters, args, argTypes, etc.
const storyContext = await getStoryContext(page, context);
if (storyContext.parameters.theme === 'dark') {
Expand All @@ -777,7 +777,7 @@ The `waitForPageReady` utility is useful when you're executing [image snapshot t
import { TestRunnerConfig, waitForPageReady } from '@storybook/test-runner';

const config: TestRunnerConfig = {
async postRender(page, context) {
async postVisit(page, context) {
// use the test-runner utility to wait for fonts to load, etc.
await waitForPageReady(page);

Expand Down

0 comments on commit fc078cf

Please sign in to comment.