Skip to content

Commit

Permalink
Merge pull request #418 from junkisai/docs/not-recommended-deprecated…
Browse files Browse the repository at this point in the history
…-func

docs: replace postRender(deprecated) with postVisit
  • Loading branch information
yannbf authored Dec 22, 2023
2 parents bb536d6 + fc078cf commit 214c9f4
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 214c9f4

Please sign in to comment.