-
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: test config overrides #5346
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
613178f
to
224f1ec
Compare
224f1ec
to
599d978
Compare
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 |
…s' into declarative-test-configs
Either I'm confused or this is not working as described. Based off the discussion in this thread as well as in the Cypress docs here, I believe I could update a test suite by adding the following for the second parameter:
I'm expecting this to skip a test suite if the
This does not exclude the test suite, however, and I'm not clear why... |
@mellis481 I am not sure how the confusion sets here:
Thus in your example describe('Users index page', { env: { includedTests: '!platform' } }, () => {
it('set the env variable', () => {
Cypress.env('includedTests') // will be "!platform"
})
} Tip: if you want to skip a test using the value of an environment variable, check out https://github.com/cypress-io/cypress-skip-test |
@bahmutov When I read the Cypress docs starting at Test Configuration, it describes allowed config values, any of which I believed could be used to exclude a test. I had assumed that the example used in the "Suite configuration" section was just one example that happened to use the browser config value for suite exclusion. I'm unclear why the only config value that can be used to exclude a test is |
Opened cypress-io/cypress-documentation#3200 to clarify it in the docs |
@mellis481 I encountered the same issue as you. |
Cypress.isBrowser()
to allow for bool/array checks #7168User facing changelog
testConfigOverrides
to the test or suite as the second argument.Cypress.isBrowser()
has been expanded to allow for new matcher arguments to assist in filtering matching browsers.Additional details
baseUrl
and be able to preemptively switch domains without executing before[each] hooks Code in hooks and test are rerun when changing to a different superdomain #1987 (does not fix)How has the user experience changed?
Test/Suite Options
isBrowser changes
Cypress.isBrowser
has been extended to allow for more filter matchers including!browser
and passing an array or Object for matching.Before
After (can also check these things)
Tasks
watchForFileChanges
should be removed from inline config)isBrowser
to support!
syntax for excluding a browseroriginalTitle
in server/reporterTestConfigOptions
toTestConfigOverride
Review task
PR dependencies
PR Tasks
cypress-documentation
? Test/Suit configuration options + Cypress.isBrowser updates cypress-documentation#2697type definitions
?