-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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: create config package for config validation #18589
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@@ -160,7 +160,7 @@ export default function (Commands, Cypress, cy, state, config) { | |||
// stuff, or handling this in the runner itself? | |||
// Cypress sessions will clear cookies on its own before each test | |||
Cypress.on('test:before:run:async', () => { | |||
if (!Cypress.config.experimentalSessionSupport) { | |||
if (!Cypress.config('experimentalSessionSupport')) { |
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.
was this causing a bug? since before this condition would always pass
@emilyrohrbough if this is breaking, the base branch should be updated to |
* develop: (329 commits) chore: Update Chrome (stable) to 96.0.4664.45 (#18931) fix: Loading of specs with % in the filename (#18877) chore: refactor `create` into class `$Cy` (#18715) chore: Update Chrome (beta) to 96.0.4664.45 (#18891) fix: flaky `system-tests-firefox` job (#18848) release 9.0.0 feat: ensure major release have conduit app wait on localhost:3000 fix install-required-node use --legacy-peer-deps feat: ensure major release fix darwin node install chore(driver): fix integration test retry configuration (#18643) feat(deps): update dependency electron to v15 🌟 (#18317) chore: Bind this correctly when setting response headers with cy.route() (#18859) feat: create config package for config validation (#18589) chore: patch `winston` to suppress `padLevels` warning (#18824) chore: test out major release build fix: remove outdated npm registry links (#18727) fix: Adding an existing command with `Cypress.Commands.add()` will throw an error (#18587) ...
This change creates a
packages/config
package which provides the list of configuration options and their default values and validation functions. The majority of this work has been extracting the existing configuration logic out of thepackages/server
module so it could also be used by thepackages/driver
module during in-test configuration updates made viaCypress.config
.User facing changelog
Add validation to in-test configuration updates made with
Cypress.config
.How has the user experience changed?
User will be shown an error message if their tests attempts to update the cypress configuration with an invalid value. Previously, the configuration would silently be updated and could cause un-expected behaviors or appear to be broken.
Example as seen in #2918, setting the baseUrl to an
' '
is not a valid baseUrl value. After this change the following would be displayed:PR Tasks
cypress-documentation
?