Until now, end-to-end testing wasn’t easy. It was the part developers hated. Not anymore. Cypress makes setting up, writing, running and debugging tests easy.
nx e2e [appName]-e2e --watch
Adding configuration to a
nx generate @nrwl/react:storybook-configuration --name=shared-ui --cypressDirectory=storybook-e2e
Mock Service Worker
Testing Storybook Components
Goal: reuse configuration in Storybook for Cypress component testing to simplify testing flow.
- To demo your components in Storybook, you need a context, a theme provider and/or wrappers
- Components rely on global app CSS to render correctly
- It takes significant effort setting up Storybook to get your components to work properly
- Need to rewrite all this configuration all over again just to test your components
|Realworld Cypress React|
|Cypress for Everything|
|React Testing Starter|
|Mock Service Worker|