From e14d0ab4a146602ea1e685cc7e3f913b23c34608 Mon Sep 17 00:00:00 2001 From: JuliaNeumann Date: Tue, 12 May 2020 14:39:01 +0200 Subject: [PATCH] docs(storyshots-puppeteer): fix examples in README --- addons/storyshots/storyshots-puppeteer/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/storyshots/storyshots-puppeteer/README.md b/addons/storyshots/storyshots-puppeteer/README.md index bbb903eb547..aff14547b6f 100644 --- a/addons/storyshots/storyshots-puppeteer/README.md +++ b/addons/storyshots/storyshots-puppeteer/README.md @@ -93,12 +93,14 @@ You might use `getGotoOptions` to specify options when the storybook is navigati ```js import initStoryshots from '@storybook/addon-storyshots'; -import { imageSnapshot } from '@storybook/addon-storyshots-puppeteer'; +import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'; + const getGotoOptions = ({ context, url }) => { return { waitUntil: 'networkidle0', }; }; + initStoryshots({ suite: 'Puppeteer storyshots', test: puppeteerTest({ storybookUrl: 'http://localhost:6006', getGotoOptions }), @@ -220,7 +222,7 @@ Runs [Axe](https://www.deque.com/axe/) accessibility checks and verifies that th import initStoryshots from '@storybook/addon-storyshots'; import { axeTest } from '@storybook/addon-storyshots-puppeteer'; -axeTest({ suite: 'A11y checks', test: axeTest() }); +initStoryshots({ suite: 'A11y checks', test: axeTest() }); ``` For configuration, it uses the same `story.parameters.a11y` parameter as [`@storybook/addon-a11y`](https://github.com/storybookjs/storybook/tree/next/addons/a11y#parameters)