@storybook/addon-storyshots-puppeteer

  • Version 6.5.6
  • Published
  • 33.9 kB
  • 7 dependencies
  • MIT license

Install

npm i @storybook/addon-storyshots-puppeteer
yarn add @storybook/addon-storyshots-puppeteer
pnpm add @storybook/addon-storyshots-puppeteer

Overview

Image snapshots addition to StoryShots based on puppeteer

Index

Variables

variable defaultAxeConfig

const defaultAxeConfig: AxeConfig;

    variable defaultCommonConfig

    const defaultCommonConfig: CommonConfig;

      variable defaultImageSnapshotConfig

      const defaultImageSnapshotConfig: ImageSnapshotConfig;

        variable defaultPuppeteerTestConfig

        const defaultPuppeteerTestConfig: PuppeteerTestConfig;

          Functions

          function axeTest

          axeTest: (customConfig?: Partial<AxeConfig>) => {
          ({ context }: any): Promise<void>;
          timeout: number;
          afterAll: () => Promise<void>;
          beforeAll: { (): Promise<void>; timeout: number };
          };

            function imageSnapshot

            imageSnapshot: (customConfig?: Partial<ImageSnapshotConfig>) => {
            ({ context }: any): Promise<void>;
            timeout: number;
            afterAll: () => Promise<void>;
            beforeAll: { (): Promise<void>; timeout: number };
            };

              function puppeteerTest

              puppeteerTest: (customConfig?: Partial<PuppeteerTestConfig>) => {
              ({ context }: any): Promise<void>;
              timeout: number;
              afterAll: () => Promise<void>;
              beforeAll: { (): Promise<void>; timeout: number };
              };

                Interfaces

                interface AxeConfig

                interface AxeConfig extends CommonConfig {}

                  property beforeAxeTest

                  beforeAxeTest: (page: Page, options: Options) => Promise<void>;

                    interface CommonConfig

                    interface CommonConfig {}

                      property chromeExecutablePath

                      chromeExecutablePath: string;

                        property customizePage

                        customizePage: (page: Page) => Promise<void>;

                          property getCustomBrowser

                          getCustomBrowser: () => Promise<Browser>;

                            property getGotoOptions

                            getGotoOptions: (options: Options) => DirectNavigationOptions;

                              property setupTimeout

                              setupTimeout: number;

                                property storybookUrl

                                storybookUrl: string;

                                  property testTimeout

                                  testTimeout: number;

                                    interface Context

                                    interface Context {}

                                      property kind

                                      kind: string;

                                        property parameters

                                        parameters: {
                                        [key: string]: any;
                                        };

                                          property story

                                          story: string;

                                            interface ImageSnapshotConfig

                                            interface ImageSnapshotConfig extends CommonConfig {}

                                              property afterScreenshot

                                              afterScreenshot: (options: { image: string; context: Context }) => Promise<void>;

                                                property beforeScreenshot

                                                beforeScreenshot: (
                                                page: Page,
                                                options: Options
                                                ) => Promise<void | ElementHandle>;

                                                  property getMatchOptions

                                                  getMatchOptions: (options: Options) => MatchImageSnapshotOptions;

                                                    property getScreenshotOptions

                                                    getScreenshotOptions: (options: Options) => Base64ScreenShotOptions;

                                                      interface PuppeteerTestConfig

                                                      interface PuppeteerTestConfig extends CommonConfig {}

                                                        property testBody

                                                        testBody: ((page: Page, options: Options) => void | Promise<void>) & {
                                                        filter?: (options: Options) => boolean;
                                                        };

                                                          Package Files (5)

                                                          Dependencies (7)

                                                          Dev Dependencies (2)

                                                          Peer Dependencies (2)

                                                          Badge

                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/addon-storyshots-puppeteer.

                                                          • Markdown
                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@storybook/addon-storyshots-puppeteer)
                                                          • HTML
                                                            <a href="https://www.jsdocs.io/package/@storybook/addon-storyshots-puppeteer"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>