-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a Cypress App for a React Storybook Library Fails #21770
Labels
Comments
AgentEnder
added
the
scope: testing tools
Issues related to Cypress / Jest / Playwright / Vitest support in Nx
label
Feb 16, 2024
Thank you for bringing this issue to our attention! I want to assure you that I will take a look as soon as I can. |
Coly010
added a commit
that referenced
this issue
May 13, 2024
Coly010
added a commit
that referenced
this issue
May 13, 2024
Coly010
added a commit
that referenced
this issue
May 13, 2024
Coly010
added a commit
that referenced
this issue
May 13, 2024
…s project #21770 (#23327) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> The `@nx/storybook:cypress-project` generator expects there to be a defined target for e2e target. However, since the introduction of inference, this may not be the case. This results in the generator erroring ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> The `@nx/storybook:cypress-project` generator should handle inference and generate an appropriate cypress.config.ts file ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #21770
FrozenPandaz
pushed a commit
that referenced
this issue
May 13, 2024
…s project #21770 (#23327) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> The `@nx/storybook:cypress-project` generator expects there to be a defined target for e2e target. However, since the introduction of inference, this may not be the case. This results in the generator erroring ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> The `@nx/storybook:cypress-project` generator should handle inference and generate an appropriate cypress.config.ts file ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #21770 (cherry picked from commit 61129f4)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Current Behavior
npx nx g @nx/storybook:cypress-project myReactLibWithStorybook
failsExpected Behavior
A Cypress App for the UI library is generated
GitHub Repo
No response
Steps to Reproduce
npx nx g @nx/storybook:cypress-project myReactLibWithStorybook
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
nx/packages/storybook/src/generators/cypress-project/cypress-project.ts
Line 147 in 11e139c
The line should read
...e2eTarget?.options
- there is no app, since we are generating it at this point, so e2eTarget is of courseundefined
. If you manually add?
then the generator run successfully.The text was updated successfully, but these errors were encountered: