Has anyone here already …

1 minute read

Has anyone here already integrated routed components (pages) with Storybook & Cypress?

Responses:

What exactly are you trying to do? Use storybook and cypress to test lazy loaded routes? I haven’t used storybook yet but I believe they operate independently from one another?

Well I’m thinking about testing my smart components in isolation from the rest of the app, so wondering if there are resources out there about the necessary setup/configuration.

Since Storybook sets up fake modules, I kind of imagine all I need to do in there, but wondering about the practical things to know/pay attention to and known issues/limitations

Ya if you want to test your smart components in isolation storybook is the way to go. If you want to test full flows for features then use cypress.

I haven’t looked at the docs fully yet but im sure nrwl goes through some of the caveats/best practices in their storybook guide

Yep that’s the idea I have in mind, for now I’ve already split up everything in libs, with dedicated e2e testing modules and am developing/testing my dumb components through Storybook

Now I’m thinking about getting a level above and testing a single “page flow” also from Storybook, which would be cool

Updated: