cypress
cypress copied to clipboard
Trouble upgrading to v10
Hi, I'm working through the Testing Web Apps with Cypress course on FE Masters, and I'm having difficulty upgrading Cypress to the latest version. I've been looking on StackOverflow for a few minutes now, and I'm just wondering...has someone already upgraded with this repo?
This is the error:
Your /Users/zebgirouard/Coding/tuts/cypress/cypress/plugins/index.ts file threw an error.
Please ensure your pluginsFile is valid and relaunch the migration tool to migrate to Cypress version 10.0.0.
I tried commenting out the imports in that file, and it's still the same error after re-running DEBUG=cypress* npx cypress open
.
And unfortunately the videos for migrating to v10 on the Cypress site seem to assume that this error does not show--that I should just see a "Migrate to v10" button or something in the UI.
We recorded this course before 10.0.0 was even in beta yet and this repository reflects the content in the course. I'll defer to @1Marc on this, but we'll probably update this course to the latest version of Cypress, which I think is at like 12.7.0 as I write this.
I second this. I've spent a few hours trying to migrate it to v12 and can't figure it out. Would love to know when this is being updated.
Hey! 👋
Maybe this will help someone I was migrating to cypress v13 and faced the same error
Here's what you need to do:
- Remove
cypress.json
- Create
cypress.config.js
with the following content
import { defineConfig } from 'cypress'
import plugins from './cypress/plugins'
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
specPattern: '**/*.spec.{js,ts}', // <-- by default it uses cypress/e2e/**/*.cy.{js,jsx,ts,tsx}
setupNodeEvents(on, config) {
return plugins(on, config)
},
},
})
- Rename
cypress/integration
tocypress/e2e
- Rename
cypress/support/index.js
tocypress/support/e2e.js
I hope I haven't forgotten anything