Closed rafal2228 closed 10 months ago
Thanks for the bug report @rafal2228 !
I created a PR that will find the correct tsconfig.json
that's needed. However, I have to note here that there is some wonkiness regarding libs and @storybook/react-webpack5
. If you use @storybook/react-vite
for your library you will not have an issue. Similarly, when my PR gets merged, and you are on a React application that uses @storybook/react-webpack5
, you will again not have an issue.
Also, we are now suggesting that you use Interaction tests instead of Cypress to test your Storybooks and your components: https://nx.dev/recipes/storybook/storybook-interaction-tests, you should check this out if you're interested! :D
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Auto generated storybook configuration with cypress setup is not compatible with
@nx/react/plugins/storybook
plugin. After trying to run tests in relatede2e
project, the storybook fails to start as it incorrectly treats the root ofe2e
package as directory where thetsconfig.storybook.js
file should be - while in practice it is in the library folder.Expected Behavior
The autogenerated
e2e
target of cypress project should workGitHub Repo
https://github.com/rafal2228/storybook-cypress-integration-issue
Steps to Reproduce
The repro repo was created with:
npx nx run ui-e2e:e2e
Nx Report
Failure Logs
Package Manager Version
9.5.1
Operating System
Additional Information
No response