-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(testing): avoid overwriting environment variables in nx cypress preset #20748
Conversation
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 489b011. 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. |
cde4f2f
to
f068625
Compare
f068625
to
489b011
Compare
env: { | ||
|
||
[NX_PLUGIN_OPTIONS]: { | ||
webServerCommand: options?.webServerCommands?.default, | ||
webServerCommands: options?.webServerCommands, | ||
ciWebServerCommand: options?.ciWebServerCommand, | ||
}, |
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.
question: does cypress ever validate the config? wonder if this will through? doesn't seem to currently, but something to keep in mind. 👍
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.
Yeah, they don't currently validate it. We'll keep an eye on it when migrating to new versions. Thanks Caleb 🎉
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. |
Current Behavior
The nxCypressPreset function sets
e2e.env
- this overwrites the baseenv
argument if its present in cypress config, and thus breaks things for users.Expected Behavior
The preset and plugin communicate without setting extra things on the env. However, some stuff still goes through the env because we can set that on the CLI easily. Because of this, we need to support reading from the env, and just avoid writing anything to the env in the file.
Related Issue(s)
Fixes #