Skip to content

Commit

Permalink
Merge pull request #24361 from irangarcia/docs/remove-deprecated-file…
Browse files Browse the repository at this point in the history
…-url

Documentation: Remove file URL examples from storyshots-puppeteer docs
  • Loading branch information
ndelangen authored Oct 9, 2023
2 parents 3368b85 + bcef966 commit 89af803
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions code/addons/storyshots-puppeteer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ When running Puppeteer tests for your stories, you have two options:
- Have a storybook running (ie. accessible via http(s), for instance using `npm run storybook`)
- Have a static build of the storybook (for instance, using `npm run build-storybook`)

Then you will need to reference the storybook URL (`file://...` if local, `http(s)://...` if served)
Then you will need to reference the storybook URL (`http(s)://...`)

## _puppeteerTest_

Expand Down Expand Up @@ -72,21 +72,6 @@ initStoryshots({

The above config will use _<https://my-specific-domain.com:9010>_ for tests. You can also use query parameters in your URL (e.g. for setting a different background for your storyshots, if you use `@storybook/addon-backgrounds`).

You may also use a local static build of storybook if you do not want to run the webpack dev-server:

```js
import initStoryshots from '@storybook/addon-storyshots';
import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer';

initStoryshots({
suite: 'Puppeteer storyshots',
test: puppeteerTest({
storybookUrl: 'file:///path/to/my/storybook-static',
// storybookUrl: 'file://${path.resolve(__dirname, '../storybook-static')}'
}),
});
```

### Specifying options to _goto()_ (Puppeteer API)

You might use `getGotoOptions` to specify options when the storybook is navigating to a story (using the `goto` method). Will be passed to [Puppeteer .goto() fn](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagegotourl-options)
Expand Down

0 comments on commit 89af803

Please sign in to comment.