-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cypress-to-electron version mapping #3228
Comments
Comments on Cypress being coupled to Electron version today: #2761 (comment) |
This is especially important if binary dependencies have to be built against the matching Electron runtime as described here: #3649 (comment) I'd like to use gRPC in my Cypress tests, but I'm totally stuck, because I simply can't find out the Electron version currently used. EDIT: For everyone who comes after me: I found the current Electron version in the changelog: https://docs.cypress.io/guides/references/changelog.html#3-5-0 It's 5.0.10. |
You can always find the current version of Electron in our |
There are two ways that I know of to find the current version of Electron from within Cypress:
|
Verified the ways suggested are working to get the current Electron version: module.exports = (on, config) => {
const ElectronVersion = process.versions.electron
console.log(ElectronVersion)
on('file:preprocessor', (file) => {
// can use version here
})
on('task', {
// can use version here
})
// or any other plugin event or custom code you have
} I'm going to close this as resolved since there seems to be a reasonable workaround for the cases asked for here. |
I see the Electron version is somewhere around v11, but in the Cypress UI it shows "Electron 80" (I'm on cypress 4) - does "80" correspond to the version of chrome? |
@inorganik that is correct. Electron is currently at 11.x in released versions of Cypress and will be bumped to 12.x when Cypress 7.0 is released. |
@flotwig Thanks! Is there anyway to pin a version of electron/chrome, e.g v87? Guessing not but wanted to check. |
@inorganik no, each version of Cypress is pinned to the version of Electron it ships with. But you can install the desired version of Chrome on your CI system and run with |
Current behavior:
It is not straightforward to find out which electron version is used by Cypress.
There are also some issues with the current electron version (see #2559, #2069, 2516).
These errors can be resolved e.g. by using
babel-preset-env
and transpile the code to work with older versions of Chrome (as part of Electron).Proposal
It would be nice if Cypress could provide a tool similar to
electron-to-chrome
which simply maps a given Cypress version to a Chrome version.This Cypress version can then be used in conjunction with
babel-preset-env
in a.browserlistrc
.The text was updated successfully, but these errors were encountered: