-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Update Cypress plugin to reflect new cross-browser capabilities #5139
Update Cypress plugin to reflect new cross-browser capabilities #5139
Conversation
The migration guide mentions at least 5 breaking changes to look out for when upgrading to 4.0 so I'm not sure if it's accurate to say that changing the dependency of Cypress to ^4.0 causes no breaking changes I certainly see this breaking unaware people's cypress tests in many cases https://docs.cypress.io/guides/references/migration-guide.html#Migrating-to-Cypress-4-0 |
Thanks for the feedback @vesper8. Breaking changes are rare with Cypress, but when they are introduced during a major version bump, we take great care to communicate the changes to users and guide them to resources/examples for a quick resolution. For example, let's take a look at the first migration example from the guide you linked regarding the use of a describe('4.0 Migration Scenarios', () => {
it('mocha upgrade', (done) => {
cy.visit('https://example.cypress.io')
return new Promise((resolve) => {
resolve()
}).then(() => {
done()
})
})
}) When we run this test, it does not mysteriously fail and leave the user confused. Instead, the user will see the following:
We actually have a page in the Cypress docs that explains all error message, and we link to each one as appropriate from Cypress. The important thing is that we're upfront and helpful to the user during these moments. Some questions to move things forward:
|
Thank you for your helpful message @amirrustam, to be clear I've already upgraded to Cypress 4 and found the experience easy and smooth. I for one would certainly love for Cypress 4 to become the new default in vue-cli v4. I was simply pointing out that the upgrade does mention a few breaking changes and this will in all likelihood result in tests breaking so the answer in the initial post indicating that this PR brings in no breaking change was questionable. I sure do appreciate the usefulness of the warnings and errors that Cypress can return. |
I don't think we can push a minor or a patch update that breaks our users tests even if Cypress can document itself. Also, we have enterprise users that are not as flexible as solo developers and it would be a hassle to require them to update their test in a "non-breaking" update. We would need to bump Vue CLI version to 5.0 imo. |
@sodatea Do we have a 5.0 release planned already? |
I've created a project board for v5. But I'd more like to wait until Webpack 5 reaches RC phase to start working on it. |
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.
Please update cypress version from 4.0.0 to 4.0.1
@sodatea thank you for including this within your v5 plans. Is there a timeframe for Webpack 5 RC release? It would be great to deliver the new Firefox support and other Cypress v4 benefits to Vue CLI users sooner than later. I appreciate your consideration. |
Is this going into an upcoming release? |
@@ -24,7 +24,7 @@ | |||
}, | |||
"dependencies": { | |||
"@vue/cli-shared-utils": "^4.2.2", | |||
"cypress": "^3.8.3", | |||
"cypress": "^4.0.1", |
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.
FWIW the latest version is now 4.3.0
:)
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.
Can we use a Cypress >=4.5.0 as there is a dependency down the chain on cypress on mocha 2.4.5 that is reeeay old and causes issues with other plugins? Many thanks!
And any luck for this pr to be merged soon? :)
@jacobbundren This will be added in the v5 version of the CLI. @MickaelBergem There will be many more releases of Cypress by the time v5 of the CLI is released. I'll update the PR with the latest version prior to the CLI release. |
FYI: Until a new vue-cli version is released you can manually force the latest version if you use {
"resolutions": {
"cypress": "^4.4.0"
}
} |
Any news yet...Waiting eagerly :-) |
It make sense to upgrade to Cypress at least 4.4.0, because it better supports TS. |
My updated plan: |
Upgrading to Cypres 4.x would also improve BSD support as Cypress 4.0.0 bumps its |
Any news when this is going to be merged as we are eagerly waiting for the bump of cypress version above 4.5, thanks!! @sodatea |
@smarandav we are also waiting for the newest version of Cypress. In the meanwhile we use the following workaround: #5352 We bumped to |
Hi bros, I am waiting for this change. Thanks |
Hi there @yyx990803 , also waiting for this. Many thanks! |
@yyx990803 Any updates? |
We'll be releasing Cypress version 5.0 soon. I'll update this PR after the release, so CLI 4.5 can at least be anchored to the next major version of Cypress. |
@amirrustam Will component unit testing via cypress be supported in addition to the currently supported unit testing with Mocha+Chai or Jest? See https://github.com/JessicaSachs/vue-cli-plugin-cypress-experimental |
Hi Amir, When do you expect 5.0 to be released? |
Any updates on this? |
We just released Cypress v5.0. Updating this PR now. |
@sodatea looks like the previous version of this PR was slated for 4.5, but now it's scheduled for 5.0. What's the expected time frame for CLI v5? We'd like Cypress version updates to be easier in the future. So are you open to this idea? #5703 (comment) Side-topic: my latest commit failed a Cypress test, I can easily resolve this locally, but a faster way to see what went wrong is the Cypress Dashboard. I can get Vue CLI project OSS plan access (essentially full-featured for free), would you be interested? |
@amirrustam According to past experience, it may cost ~3 months before the stable release. An alpha version may come out before the end of October. And yeah, Cypress should be a peer dependency in the next major. It's a regret that we didn't make it in v4. |
The Cypress Dashboard looks really cool! I'd love to have access to its features. Thanks very much 😄 |
Cypress version 4.0.0 will be introducing Firefox and MS Edge support. Vue CLI Cypress plugin users will now be able to run tests in Chromium-based browsers, Firefox, and Electron. This PR updates the CLI messaging and plugin readme to reflect these upcoming changes.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)