Cypress made some visible changes to project structure when you migrate the cypress version to v10.
In this post, we will see step by step guide to migrate to v10 and understand the folder structure.
Open your existing project in VScode.
Open command prompt / terminal (CTRL + `)
Type below command to upgrade cypress library
npm install -D cypress@latest
Observe the package.json file, the cypress dependency will be changed to 10 or higher version depending on the current version.
now open the cypress UI to run tests
npm run cypress:open
This above command will pops up migration guide from Cypress listing out the details of migration, watch below demo for the screen by screen guide.
- Integration folder is changed to e2e
- [TestcaseName].spec.ts is changed to [TestcaseName].cy.ts
Note – If you had any pattern matching to run the tests inside cypress.json file, now you might want to change the pattern with the renaming of e2e folder and .spec to .cy.
- cypress.json is changed to cypress.config.ts
- plugin folder is removed, we can instead specify the plugins under cypress.config.ts file.
The detailed list of changelogs are mentioned here.
Hope this helps!