Skip to content

Not working with addon-storyshots-puppeteer #59

@FezVrasta

Description

@FezVrasta

Hi, this addon seems to break the Storybook storyshots addon. Here's a repro (I simply ran yarn create react-app && npx sb init and then added storyshots and msw):

https://github.com/FezVrasta/msw-storybook-test

Just run yarn test storybook.test.js and you will notice the tests error due to a timeout.

 ● Storyshots › Example/Page › Logged Out

    thrown: "Exceeded timeout of 15000 ms for a hook.
    Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

      4 | import { imageSnapshot } from '@storybook/addon-storyshots-puppeteer';
      5 |
    > 6 | initStoryshots({
        | ^
      7 |   test: imageSnapshot(),
      8 | });
      9 |

      at node_modules/@storybook/addon-storyshots/dist/ts3.9/api/index.js:29:37
          at Array.forEach (<anonymous>)
      at callTestMethodGlobals (node_modules/@storybook/addon-storyshots/dist/ts3.9/api/index.js:27:13)
      at testStorySnapshots (node_modules/@storybook/addon-storyshots/dist/ts3.9/api/index.js:73:9)
      at Object.<anonymous> (src/storybook.test.js:6:1)

A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks.

I noticed that replacing Puppeteer with Playwright, as explained here fixes the issue.

Could you please look into it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions