Migrating to Cypress V10
Cypress v10 introduce new features, like component testing, along with some breaking changes.
Before continuing, make sure you have all your changes committed and have a clean working tree.
You can migrate an E2E project to v10 by running the following command:
nx g @nrwl/cypress:migrate-to-cypress-10
In general, these are the steps taken to migrate your project:
- Migrates your existing
cypress.json
configuration to a newcypress.config.ts
configuration file.- The
pluginsFile
option has been replaced forsetupNodeEvents
. We will import the file and add it to thesetupNodeEvents
config option. Double-check your plugins are working correctly.
- The
- Rename all test files from
.spec.ts
to.cy.ts
- Rename the
support/index.ts
tosupport/e2e.ts
and update any associated imports - Rename the
integrations
folder to thee2e
folder
We take the best effort to make this migration seamless, but there can be edge cases we didn't anticipate. So feel free to open an issue if you come across any problems.
You can also consult the official Cypress migration guide if you get stuck and want to manually migrate your projects.