I am setting up Backstopjs for visual diff regression testing and want to automatically run a visual test for every Storybook story.
It looks like I can only use the client API to retrieve stories at runtime, after the app has run and stories have been added. But I need to generate the list of URLs statically in a build step. A few ideas how this could be solved:
kinds with child story names.Maybe there's something else more obvious I haven't thought of? Thoughts? Thanks!
Check out how storyshots works:
https://github.com/storybooks/storybook/blob/master/addons/storyshots/src/index.js#L61
@swese44 , hi
did you solve your problem? If yes, could you share the way how you do it?
Can we re-open this ticket?
It would be a super handy if Storybook could output a list of stories into a .json file. Not just for visual regression testing, I'd imagine.
Edit: I've decided to create a new ticket and reference this one since this ticket was marked as a support request. BTW, the link to the "has workaround" is broken, so it's impossible to find the work-around now.
In 5.2 we've introduced CSF which is a declarative format for defining stories.
In 5.3 we'll introduce tri-config which will make it possible for defining stoy-files declaratively too.
These 2 things together will make it possible -in theory- to generate a JSON file during the bundle-phase.
So work is being done to make this possible.
Most helpful comment
@swese44 , hi
did you solve your problem? If yes, could you share the way how you do it?