-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat: throw when writing to 'read only' properties of config
#18896
feat: throw when writing to 'read only' properties of config
#18896
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
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 |
…thub.com/cypress-io/cypress into issue-6407-warn-for-read-only-properties
configUtil.validateNoReadOnlyConfig({ foo: 'bar' }, errorFn) | ||
|
||
expect(errorFn).to.been.callCount(0) | ||
}) |
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.
Can we also assert that the argument passed to the error function is the expected option?
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.
While you're at it, expect(errorFn).to.have.callCount(0)
or expect(errorFn).not.to.have.beenCalled
😬
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.
Should be updated!
54e7548
abfabc0
* develop: chore(deps): update dependency ssri to 6.0.2 [security] (#19351) chore: Fix server unit tests running on mac by using actual tmp dir (#19350) fix: Add more precise types to Cypress.Commands (#19003) fix: Do not screenshot or trigger the failed event when tests are skipped (#19331) fix (#19262) fix: throw when writing to 'read only' properties of `config` (#18896) fix: close chrome when closing electron (#19322) fix: disable automatic request retries (#19161) chore: refactor cy funcs (#19080) chore(deps): update dependency @ffmpeg-installer/ffmpeg to v1.1.0 🌟 (#19300)
config
config
…cycle * 10.0-release: build: remove syncRemoteGraphQL from codegen chore: fix incorrect type from merge build: allow work with local dashboard (#19376) chore: Test example recipes against chrome (#19362) test(unify): Settings e2e tests (#19324) chore(deps): update dependency ssri to 6.0.2 [security] (#19351) fix: spec from story generation, add deps for install (#19352) chore: Fix server unit tests running on mac by using actual tmp dir (#19350) fix: Add more precise types to Cypress.Commands (#19003) fix: Do not screenshot or trigger the failed event when tests are skipped (#19331) fix (#19262) fix: throw when writing to 'read only' properties of `config` (#18896) fix: close chrome when closing electron (#19322) fix: disable automatic request retries (#19161) chore: refactor cy funcs (#19080) chore(deps): update dependency @ffmpeg-installer/ffmpeg to v1.1.0 🌟 (#19300)
Edit: this is what I get for half doing something on my time off. I just realized we set in the test suite to test the SDK option. 🤦🏼♂️ false alarm
|
config
#6407User facing changelog
Cypress will throw an error when a user attempts to set these 'non-writable' config values using
Cypress.config
.Additional details
The following were identified as properties that could be updated during test time:
The following were identified as read-only properties for per test config:
User experience
Trying to set read-only config in test configuration:
Trying to set read-only config within test with Cypress.config():
PR Tasks
cypress-documentation
? Update List of Valid Test Configuration Config Values cypress-documentation#4252type definitions
?cypress.schema.json
?