-
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: support ct/e2e specific overrides in cypress.json #15444
Conversation
Thanks for taking the time to open a PR!
|
module.exports = (on, config) => { | ||
module.exports = (on, config, mode) => { | ||
if (mode !== 'component') { | ||
throw Error('This is an component project. mode should be `component`.') |
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.
This is a good way to test that mode
is passed correctly. We expect this project to be only used with runner-ct.
Internal Jira issue: TR-702 |
@@ -93,6 +93,10 @@ module.exports = { | |||
}, _.cloneDeep(obj)) | |||
}, | |||
|
|||
isComponentTesting (options = {}) { | |||
return options.experimentalComponentTesting || options.componentTesting || options.testingType === 'component' | |||
}, |
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.
We have a lot of flags for CT, apparently... we should reduce these to just one or two eventually.
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.
Oy vey. Yeah we need to do this like ASAP.
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 |
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.
Overall great PR.
A few improvements to the json schema.
I believe the word mode
is used to differentiate run from open.
Should it be used as well for component vs e2e?
That is confusing.
How about context
or buildMode
?
Is there a place where we can test the new JSON schema? An idea could be to use the |
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.
To avoid blocking the PR, I change my review to comment
…)" This reverts commit a94c9d5.
We had to revert this for 6.7.1 in #15499. I'd recommend re-submitting it against the I don't think we should add a 3rd argument to the plugins file function. It should be a property on the config argument. We've augmented that object before for environment details. |
…)" This reverts commit a94c9d5.
Hi @chrisbreiding, did |
TY @lmiller1990 - I appreciate the tracking info 👍 |
Note: This behavior and API was discussed over the course of two meetings and validated with Brian, Zach, and Jess.
User facing changelog
1. Add support for runner specific overrides in
cypress.json
. Like this:2. Pass
mode
to plugins functionNote the third argument is
mode
. This iscomponent
ore2e
. The user can have conditional plugins using this flag.Additional details
It's very useful now that we have two runners, CT and E2E.
How has the user experience changed?
You can have runner specific config, and runner specific plugins.
PR Tasks
cypress-documentation
] NO. NEED TO DO THIS PRE 7.0.type definitions
? Yes.cypress.schema.json
? Yes.