Skip to content
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

[WIP] - Support Microsoft Edge (Chromium Based) #4203

Closed
wants to merge 16 commits into from
Closed

[WIP] - Support Microsoft Edge (Chromium Based) #4203

wants to merge 16 commits into from

Conversation

@YOU54F
Copy link
Contributor

@YOU54F YOU54F commented May 15, 2019

Proposal for Microsoft Edge (Chromium Based) Support in Cypress

Offical Microsoft Edge Insiders page here

Currently tested

  • Microsoft Edge for Mac (Canary Build)
    • Binary package here
  • Microsoft Edge for Mac (Dev Build)
    • Binary package here
  • Microsoft Edge for Windows 10 (Canary Build)
    • Binary package here
  • Microsoft Edge for Windows 10 (Dev Build)
    • Binary package here
  • Microsoft Edge for Linux (Canary Build)
    • Binary package currently unavalable
  • Microsoft Edge for Linux (Dev Build)
    • Binary package currently unavalable

Terminal output after change (in /packages/launcher)

➜  launcher git:(feat/msEdge) ✗ npm run build && node index.js
Alias tip: npmR build && npm install && node index.js

> @packages/launcher@0.0.0 build /Users/you54f/dev/saftest/githubrepos/forks/cypress/packages/launcher
> bin-up tsc --project .

Found /Users/you54f/dev/saftest/githubrepos/forks/cypress/node_modules/.bin/tsc

Launcher project exports
{ launch: [Function: launch],
  detect: [Function],
  detectByPath: [Function] }
⛔️ please use it as a module, not from CLI
detected 2 browsers
[ { name: 'chrome',
    family: 'chrome',
    displayName: 'Chrome',
    version: '74.0.3729.157',
    path:
     '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
    majorVersion: '74' },
  { name: 'edge',
    family: 'chrome',
    displayName: 'Edge',
    version: '76.0.159.0',
    path:
     '/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary',
    majorVersion: '76' } ]

Screenshot 2019-05-14 at 22 59 23

Screenshot 2019-05-14 at 22 59 28

Screenshot 2019-05-14 at 23 11 03

Screenshot 2019-05-14 at 23 26 02

Screenshot 2019-05-14 at 23 26 12

@CLAassistant
Copy link

@CLAassistant CLAassistant commented May 15, 2019

CLA assistant check
All committers have signed the CLA.

Loading

package.json Outdated Show resolved Hide resolved
Loading
@jennifer-shehane jennifer-shehane changed the title [Proposal] - Support Microsoft Edge (Chromium Based) [WIP] - Support Microsoft Edge (Chromium Based) May 20, 2019
@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented May 20, 2019

@jennifer-shehane thanks for reviewing, I am tracking and testing the edge packages at this github repo https://github.com/YOU54F/cypress-edge and have it working in CI at the moment :)

Loading

@coding-yogi
Copy link

@coding-yogi coding-yogi commented Jun 10, 2019

Need additional changes to make it work on windows

Loading

@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Jun 10, 2019

Need additional changes to make it work on windows

🙄 yep, hence why I’ve not marked the windows checkboxes in the first post.

Loading

@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Jun 10, 2019

now supporting windows edge/dev ms edge builds

detected 3 browsers
[ { name: 'chrome',
    family: 'chrome',
    displayName: 'Chrome',
    version: '74.0.3729.169',
    path:
     'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe',
    majorVersion: '74' },
  { name: 'edgeCanary',
    family: 'chrome',
    displayName: 'Edge Canary',
    version: '77.0.186.0',
    path:
     'C:\\Users\\grung\\AppData\\Local\\Microsoft\\Edge SxS\\Application\\msedge.exe',
    majorVersion: '77' },
  { name: 'edgeDev',
    family: 'chrome',
    displayName: 'Edge Dev',
    version: '76.0.176.1',
    path:
     'C:\\Program Files (x86)\\Microsoft\\Edge Dev\\Application\\msedge.exe',
    majorVersion: '76' } ]

Loading

@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Jun 11, 2019

@flotwig @bahmutov

Got Edge Dev & Edge Canary running on Windows now but I am having trouble building the binary.

It gets most of the way but fails when trying to perform a symlink for the electron package.

I am running git bash for windows (https://gitforwindows.org/)

All tasks completed successfully
1:07:54 AM #testVersion win32
testing dist package version
by calling: node index.js --version
in the folder C:\Users\grung\Documents\GitHub\cypress\dist\win32
app in C:\Users\grung\Documents\GitHub\cypress\dist\win32
built app version 3.3.0
1:07:56 AM #elBuilder win32
from C:\Users\grung\Documents\GitHub\cypress\dist\win32
into C:\Users\grung\Documents\GitHub\cypress\build\win32\Cypress
Packaging app for platform win32 x64 using electron v2.0.18
Error: EPERM: operation not permitted, symlink 'C:\Users\grung\AppData\Roaming\Cypress\cy\' -> 'C:\Users\grung\AppData\Local\Temp\electron-packager\win32-x64\Cypress-win32-x64\resources\app\packages\server\.cy'

How are you building it for windows? Via Appveyor?

BTW - Your contributing and deployment docs are quality! and the build process is 👌 kudos to all in the team.

Loading

@flotwig
Copy link
Member

@flotwig flotwig commented Jun 11, 2019

@YOU54F Hmm, I don't know if I've seen that, but re-building Cypress on Windows from scratch always fixes whatever weird filesystem issue I'm having. Have you tried re-cloning Cypress and doing npm install over again? Might fix it.

Loading

@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Jun 11, 2019

@YOU54F Hmm, I don't know if I've seen that, but re-building Cypress on Windows from scratch always fixes whatever weird filesystem issue I'm having. Have you tried re-cloning Cypress and doing npm install over again? Might fix it.

Cheers for the reply bud, I'll try it on my desktop machine when I'm home, I've got a few diff shells on that, and WSL (windows subsystem linux) so may have more luck. Will keep you posted 👍

Loading

@bahmutov
Copy link
Collaborator

@bahmutov bahmutov commented Oct 18, 2019

@YOU54F I have confirmed it is working on Mac, could you accept https://github.com/YOU54F/cypress/pull/5 that fixes the linting errors? For some reason my CLI pull request never upload to this PR, instead they create a new branch, ughh

Loading

@bahmutov
Copy link
Collaborator

@bahmutov bahmutov commented Oct 18, 2019

Loading

@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Oct 18, 2019

@bahmutov accepted the pr now for linter errors.

Chromium edge is still only available on insiders at the moment, so you would need to download and install the executable directly on a windows vm. I have been meaning to set it up with circleci now that they have windows executors

Loading

@bahmutov
Copy link
Collaborator

@bahmutov bahmutov commented Oct 18, 2019

yeah @YOU54F - I would love to see how it is done on Windows.
Also, this PR is interesting from #5068 - since if we can return MS Edge in the list of browsers with family: chrome there it will "just" work.

Loading

@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Oct 18, 2019

yeah @YOU54F - I would love to see how it is done on Windows.
Also, this PR is interesting from #5068 - since if we can return MS Edge in the list of browsers with family: chrome there it will "just" work.

That PR does indeed look like it would be ideal! I think there was someone on gitter trying to get chrome to recognise a browser that chrome based but didn't mention which one, so it looks like it would get many birds with one stone.

Will see what I can do with regards to the windows edge on circleci with cypress 👍 got the laptop out as I have been doing some tweaks on a work project to see if we can speed up build times but that can really wait until the 9-5!

Loading

@bahmutov
Copy link
Collaborator

@bahmutov bahmutov commented Oct 18, 2019

yeah, not rush there. I think this PR is great because it has the detection logic.

Loading

@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Oct 18, 2019

Ahhh reading my last comments, I forgot that I couldn't actually get it to build the binaries on my windows machines!

Loading

@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Oct 25, 2019

@bahmutov - tried to setup a run in circleci, but I've ran out of credits so no dice, but got the binaries built in windows (via bootcamp on my mac) and have it working now.

I have released the binaries here :- https://github.com/YOU54F/cypress/releases/download/v3.5.0/cypress_win.zip

and an associated cli release here :- https://www.npmjs.com/package/@you54f/cypress

instructions to use, for testing

Supported versions

  • Microsoft Edge for Windows 10 (Canary Build)
    • Binary package here
  • Microsoft Edge for Windows 10 (Dev Build)
    • Binary package here

Instructions for Windows

  1. Download Microsoft Edge version of choice as above
  2. Make a new directory
  3. Run set CYPRESS_INSTALL_BINARY=https://github.com/YOU54F/cypress/releases/download/v3.5.0/cypress_win.zip
  4. Run npm init
  5. Run npm install @you54f/cypress --save
  6. Run node_modules/.bin/cypress open --browser edgeDev to open in interactive mode, and setup Cypress.io's example project
  7. Run node_modules/.bin/cypress run --browser edgeDev or node_modules/.bin/cypress run --browser edgeCanary to run in command line mode.
  8. Rejoice & please pass back some appreciation with a star on the repository! Thanks :)

Loading

@jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Dec 19, 2019

Hey @YOU54F, any updates on this PR?

Loading

@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Dec 21, 2019

Hey @YOU54F, any updates on this PR?

Hello @jennifer-shehane,

Edge is due out on general release near the end of the January, it was announced near the start or December. There is no news on a Linux build yet, so it will be macOS and windows only.

We could release the Mac changes now and the windows changes when we have the official executable names when it goes on general release or support edge dev, beta and canary until the released versions are out?

Loading

@jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Dec 23, 2019

@YOU54F Ok, I just wanted to hear what you felt was left. There's a lot more left on our side:

  • Updating our tests to run through Edge (this may show potential issues between Edge and our other tested browser that we'd need to fix)
  • Adding an Edge icon to the browser dropdown
  • Creating a docker container with Edge to use
  • Add support within browser functions like 'isBrowser'
  • Handled excluding Edge from Linux builds

These are just off the top of my head, there's a lot more that needs updating, you can see some in the Firefox PR that we would need to do for any added Browser https://github.com/cypress-io/cypress/pull/1359/files

I suspect we'll have someone from our team start a new PR for this work is what I'm getting at. cc @bahmutov

Loading

@bahmutov
Copy link
Collaborator

@bahmutov bahmutov commented Jan 15, 2020

Loading

@jennifer-shehane jennifer-shehane requested a review from bahmutov Jan 16, 2020
@bahmutov
Copy link
Collaborator

@bahmutov bahmutov commented Jan 16, 2020

@YOU54F thank you for this excellent work, I have pulled your branch into internal branch and opened a pull request #6181 - it seems to work on my Mac, but I need to set up some kind of CI test before landing this. Closing this PR, follow 6181 for updates

Loading

@bahmutov bahmutov closed this Jan 16, 2020
@YOU54F
Copy link
Contributor Author

@YOU54F YOU54F commented Jan 16, 2020

Cheers @bahmutov & @jennifer-shehane glad to help!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants