-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(nextjs): can set compiler when setting up nxComponentTestingPreset
#19171
feat(nextjs): can set compiler when setting up nxComponentTestingPreset
#19171
Conversation
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 643fa2a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
Hey @erenken thanks for this PR! Can you please add some more tests around this? |
@erenken changes look good, we just need a few tests around this and the pipelines to pass! :D Just ping me when you're done and I will merge! Thank you for this PR! |
Are there any existing tests for the Just adding the line:
Produces this error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /workspaces/nx/packages/nx/src/native/nx.linux-x64-gnu.node)
180 | try {
181 | if (localFileExisted) {
> 182 | nativeBinding = require('./nx.linux-x64-gnu.node')
| ^
183 | } else {
184 | nativeBinding = require('@nx/nx-linux-x64-gnu')
185 | }
at CompileFunctionRuntime._loadModule (../../node_modules/.pnpm/jest-runtime@29.5.0/node_modules/jest-runtime/build/index.js:1009:29)
at Object.<anonymous> (../nx/src/native/index.js:182:31)
at Object.<anonymous> (../nx/src/hasher/task-hasher.ts:23:1)
at Object.<anonymous> (../nx/src/hasher/hash-task.ts:4:1)
at Object.<anonymous> (../nx/src/tasks-runner/task-orchestrator.ts:21:1)
at Object.<anonymous> (../nx/src/tasks-runner/default-tasks-runner.ts:2:1)
at Object.<anonymous> (../devkit/nx-reexports-pre16.ts:209:1)
at Object.<anonymous> (../devkit/index.js:21:20)
at Object.<anonymous> (../cypress/src/utils/ct-helpers.ts:2:1)
at Object.<anonymous> (plugins/component-testing.ts:1:1)
at Object.<anonymous> (plugins/component-testing.spec.ts:1:1) When I comment out that line no errors and the tests pass. Any recommendations? I am running in the devcontainer. I did run sudo apt update
sudo apt upgrade Also tried install Well, hey, I got passed that error. I had to update the
|
Never mind, I got it all working after updating the devcontainer. Pushing tests soon. |
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
@barbados-clemens adding you in this conversation to take a look! :D |
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
@mandarini I got all the changes that you and @barbados-clemens wanted. I removed the packages I added to packages.json and created E2E test, and everything is passing. If I missed something or you need more, please let me know. I would like to get this merged in so we can get code coverage working in our project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like the package.json changes are still there can you revert those real quick?
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
I know it looks like the main-linux failed, but I think it just needs to be re-ran. I have found that these pipelines are very temperamental and the only way to re-run them is to commit a change or update from master. It was working before the last update from master. |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Currently nextjs only uses the swa compiler in Cypress component testing.
To use @cypress/code-coverage you need to use babel, you can now select which compiler to use.
closed #19131
Current Behavior
Cypress Code Coverage doesn't work in a next project when using
nxComponentTestingPreset
from@nx/next/plugins/component-testing
. Currently it works if you are using a react project and importingnxComponentTestingPreset
from@nx/react/plugins/component-testing
, but tests using NavLink fail because they are missing process with using this preset.Expected Behavior
I would expect Cypress Code Coverage to work in a next and react project.
Related Issue(s)
Fixes #19131
Unable to run test on
devcontainer
, so that was updated to use latest version.