-
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: error when updating a 9.X value in 10.X in the pluginsFile #20521
feat: error when updating a 9.X value in 10.X in the pluginsFile #20521
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 |
cy.visitLaunchpad() | ||
cy.findByText('E2E Testing').click() | ||
cy.get('h1').should('contain', 'Error Loading Config') | ||
cy.percySnapshot() |
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.
Personally like to assert the actual error using a cy.get(...).contains(...)
. Not a blocker, but I think those are more clear and easier to debug than Percy snapshots.
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.
Seems fine, left one non blocking comment on the test (don't like Percy alone, I like the more explicit assertions) but still going to give it a ✔️ .
To confirm - if you delete the property in your video and save the file, the config file re-executes and everything works as expected and you can proceed?
NOTE: this PR has been split in 2. This one only add the renamed config options to the array and makes sure the config is validated after setupNodeEvents.
The other one builds contextualization linked in the video below.
User facing changelog
In setupNodeEvents(), when updating options of 9.X that are not in 10.X, users get an error like below
Additional details
trimmed.mov
The wrapper
To achieve the behavior above, I set all breaking options setters to error.
The following code will throw an error.
This way, cypress gives users the line and codeframe where the invalid config set is done. This helps avoid the pain of searching for the file and line where the wrong "set" is done.
Missing breaking values
This PR adds
integrationFolder
andignoreTestFiles
to thebreakingOptions
list of configs that worked in 9 and are ignored in 10. To makeignoreTestFiles
easier, I refactored the testFiles error slightly by using thenewName
property.I also added to all the existing errors the management of the stack trace.