Storybook: How to verify in CI that all Storybooks load without error?

Created on 31 Jul 2019  路  4Comments  路  Source: storybookjs/storybook

Hello,

In the past, we've had issues in our projects where some changes are merged that breaks one or more storybooks (red error page instead of component). We have a checks that run when a PR is posted, inside Docker, and I would like to add a step there to validate that all storybooks work/load without error. I've thought about using Cypress or Jest, but wanted to ask around first to see if anyone else is doing this.

Please let me know if more detail is necessary.

Thanks!

storyshots cli question / support

Most helpful comment

@jnielson94 @shilman Sorry for my delayed response! This is awesome! Exactly what I was looking for. Thanks again!

All 4 comments

Hi @andyasberry! We recently added this to our component library using the storyshots addon - https://github.com/storybookjs/storybook/tree/master/addons/storyshots/storyshots-core

We decided to go with the renderOnly test type, since we don't want a bunch of snapshot files laying around just to make sure our stories don't have errors.

Other than that, it was pretty straightforward to setup (for the most part). Feel free to ask any other questions you might have or run into :) Good luck!

@andyasberry & @shilman - Any reason to leave this issue open? Any other questions or things that would be helpful to have here?

@jnielson94 I think that's a great answer. I typically leave these open until the original poster closes or stale-bot does :)

@jnielson94 @shilman Sorry for my delayed response! This is awesome! Exactly what I was looking for. Thanks again!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miljan-aleksic picture miljan-aleksic  路  3Comments

purplecones picture purplecones  路  3Comments

zvictor picture zvictor  路  3Comments

alexanbj picture alexanbj  路  3Comments

tirli picture tirli  路  3Comments