How to use the @storybook/addon-storyshots-puppeteer.puppeteerTest function in @storybook/addon-storyshots-puppeteer

To help you get started, we’ve selected a few @storybook/addon-storyshots-puppeteer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storybookjs / storybook / examples / official-storybook / storyshots-puppeteer / puppeteer-tests.runner.js View on Github external
* This test needs the static build of the storybook to run.
 * `yarn run storyshots-puppeteer` generates the static build & uses storyshots-puppeteer.
 * */
import path from 'path';
import initStoryshots from '@storybook/addon-storyshots';
import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer';
import getStorybookUrl from './getStorybookUrl';

const storybookUrl = getStorybookUrl();
if (storybookUrl != null) {
  initStoryshots({
    suite: 'Puppeteer tests',
    storyKindRegex: /^Addons\/Storyshots/,
    framework: 'react',
    configPath: path.join(__dirname, '..'),
    test: puppeteerTest({ storybookUrl }),
  });
}

@storybook/addon-storyshots-puppeteer

Image snapshots addition to StoryShots based on puppeteer

MIT
Latest version published 10 months ago

Package Health Score

61 / 100
Full package analysis