test: complete example plugins migration to v10+#926
Merged
AtofStryker merged 3 commits intocypress-io:masterfrom Jun 1, 2023
Merged
test: complete example plugins migration to v10+#926AtofStryker merged 3 commits intocypress-io:masterfrom
AtofStryker merged 3 commits intocypress-io:masterfrom
Conversation
|
c9f158e to
c96f227
Compare
AtofStryker
approved these changes
May 30, 2023
emilyrohrbough
approved these changes
May 30, 2023
|
🎉 This PR is included in version 5.8.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the Plugins file is deprecated in Cypress 10+, this PR updates:
to move the previously migrated Cypress
v9contents ofcypress/plugins/index.jsintocypress.config.jsinstead of requiring it. The deprecatedcypress/plugins/index.jsfile is then deleted. This is done for each of the above examples.This makes the file usage consistent with a native Cypress (modern) configuration instead of continuing with a hybrid Legacy configuration / modern configuration left behind by the migration wizard.
Background
Cypress Legacy configuration > Folders / Files for versions 9 and below uses a default
pluginsFileofcypress/plugins/index.js.Cypress (modern) configuration does not include a
pluginsFileat all. According to the Cypress documentation setupNodeEvents the Plugins file is deprecated.The Migrations Guide for Cypress 10.0 > Plugins File Removed explains the details for this change. The migration wizard of Cypress 10.x and 12.x however does not automatically remove the
cypress/plugins/index.js. It leaves it in place and integrates it into the modern / configuration. It merely leaves a "TODO" note incypress.config.js:Local Verification
Each of the examples should run successfully locally:
browser
env
firefox
quiet
GitHub verification
All example workflows should run successfully, including: