Skip to content

Commit

Permalink
Merge pull request #190 from storybookjs/tom/sb-722-render-play-funct…
Browse files Browse the repository at this point in the history
…ion-exceptions-in-the

Support Storybook 7.0 play function exceptions
  • Loading branch information
yannbf authored Sep 16, 2022
2 parents aa45827 + e69606f commit a61bb36
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 0 deletions.
Binary file removed __snapshots__/atoms-button--demo-snap.png
Binary file not shown.
Binary file removed __snapshots__/atoms-button--find-by-snap.png
Binary file not shown.
Binary file removed __snapshots__/atoms-button--primary-snap.png
Binary file not shown.
Binary file not shown.
Binary file removed __snapshots__/atoms-button--wait-for-snap.png
Binary file not shown.
Binary file removed __snapshots__/atoms-button--with-loaders-snap.png
Binary file not shown.
Binary file removed __snapshots__/molecules-header--logged-in-snap.png
Binary file not shown.
Binary file removed __snapshots__/molecules-header--logged-out-snap.png
Binary file not shown.
Binary file removed __snapshots__/pages-page--logged-in-snap.png
Binary file not shown.
Binary file removed __snapshots__/pages-page--logged-out-snap.png
Binary file not shown.
3 changes: 3 additions & 0 deletions src/setup-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ export const setupPage = async (page: Page) => {
channel.on('storyThrewException', (error) => reject(
new StorybookTestRunnerError(storyId, error.message, logs))
);
channel.on('playFunctionThrewException', (error) => reject(
new StorybookTestRunnerError(storyId, error.message, logs))
);
channel.on('storyMissing', (id) => id === storyId && reject(
new StorybookTestRunnerError(storyId, 'The story was missing when trying to access it.', logs))
);
Expand Down

0 comments on commit a61bb36

Please sign in to comment.