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

detect Microsoft Edge and Edge Canary browsers and allow running tests in them #6181

Merged
merged 25 commits into from
Feb 3, 2020

Conversation

bahmutov
Copy link
Contributor

@bahmutov bahmutov commented Jan 16, 2020

User facing changelog

If there is Edge or Edge Canary/Dev/Beta browser, it appears in the list of browsers

Screen Shot 2020-01-16 at 2 49 48 PM

The user can pick Edge or Edge Canary and run tests

Screen Shot 2020-01-16 at 2 52 07 PM

It can also run tests from command line with cypress run --browser edge or cypress run --browser edge:canary, --browser edge:dev, etc

You can run both browsers in headless mode by adding --headless flag.

Additional details

How has the user experience changed?

PR Tasks

Tasks after landing this PR

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 16, 2020

Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.

  • Please write [WIP] in the title of your Pull Request if your PR is not ready for review - someone will review your PR as soon as the [WIP] is removed.
  • Please familiarize yourself with the PR Review Checklist and feel free to make updates on your PR based on these guidelines.

PR Review Checklist

If any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'.

User Experience

  • The feature/bugfix is self-documenting from within the product.
  • The change provides the end user with a way to fix their problem (no dead ends).

Functionality

  • The code works and performs its intended function with the correct logic.
  • Performance has been factored in (for example, the code cleans up after itself to not cause memory leaks).
  • The code guards against edge cases and invalid input and has tests to cover it.

Maintainability

  • The code is readable (too many nested 'if's are a bad sign).
  • Names used for variables, methods, etc, clearly describe their function.
  • The code is easy to understood and there are relevant comments explaining.
  • New algorithms are documented in the code with link(s) to external docs (flowcharts, w3c, chrome, firefox).
  • There are comments containing link(s) to the addressed issue (in tests and code).

Quality

  • The change does not reimplement code.
  • There's not a module from the ecosystem that should be used instead.
  • There is no redundant or duplicate code.
  • There are no irrelevant comments left in the code.
  • Tests are testing the code’s intended functionality in the best way possible.

Internal

  • The original issue has been tagged with a release in ZenHub.

@bahmutov
Copy link
Contributor Author

bahmutov commented Jan 16, 2020

Finding how to run Edge browser on CI

@cypress
Copy link

cypress bot commented Jan 16, 2020



Test summary

3632 0 46 0


Run details

Project cypress
Status Passed
Commit 2455999
Started Jan 31, 2020 9:01 PM
Ended Jan 31, 2020 9:05 PM
Duration 04:48 💡
OS Linux Debian - 9.11
Browser Multiple

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@bahmutov bahmutov requested a review from kuceb January 16, 2020 23:09
@brian-mann brian-mann self-requested a review January 17, 2020 18:01
Copy link
Member

@brian-mann brian-mann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add Edge to Circle in either the OSX or Windows container.

Have it run only a single test to verify its working (since its really just Chromium)

@bahmutov bahmutov requested a review from brian-mann January 21, 2020 16:19
@bahmutov bahmutov changed the title WIP: detect Microsoft Edge and Edge Canary browsers and allow running tests in them detect Microsoft Edge and Edge Canary browsers and allow running tests in them Jan 21, 2020
@flotwig flotwig self-requested a review January 21, 2020 17:14
{
name: 'edgeCanary',
family: 'chrome',
displayName: 'Edge Canary',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add Edge Dev & Beta? Contrary to Chrome, they can all be installed in parallel on both Windows & macOS with separate profiles.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's land this change in 4.0 and then add Edge Dev and Beta separately, there are lots of changes going in, unfortunately ...

Copy link
Member

@jennifer-shehane jennifer-shehane Jan 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have EdgeDev in the browser_spec? https://github.com/cypress-io/cypress/pull/6181/files#diff-c15b51d04b162559d1996b46f9c5b209

I agree that these should just be pushed into this PR. What's the reason to wait it's just a few extra fields? Firefox has Dev and Nightly in its PR. I need to consider these values when generating the icons because we need the exact names to pull against so I've already added them in there for testing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added detection for Windows + a best guess at detection for macOS in
ca0d69f. Verified working on Windows:

image

Since I'm on Linux, can someone with a Mac verify that it detects Beta and Dev correctly? You can get the downloads here: https://www.microsoftedgeinsider.com/en-us/download?platform=macos

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try it out on MacOS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on MacOS!

Screen Shot 2020-01-31 at 3 54 39 PM

I moved Edge (stable) up so it appears before the other variants.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved Edge (stable) up so it appears before the other variants.

The order is a bit weird, though - I'd expect it to be: stable, beta, dev & canary, so that they're sorted by stability & the planned release date. Having: stable, canary, beta, dev seems quite random.

@brian-mann
Copy link
Member

@bahmutov / @chrisbreiding this PR looks super borked - likely after the force push to 4.0

Can we get it cleaned up for release?

Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me once Edge Dev + Edge Beta are manually verified on macOS: #6181 (comment)

@bahmutov
Copy link
Contributor Author

bahmutov commented Jan 31, 2020 via email

@bahmutov bahmutov merged commit 4a01cda into v4.0-release Feb 3, 2020
@cypress-bot cypress-bot bot mentioned this pull request Feb 3, 2020
@flotwig flotwig deleted the pr/4203 branch January 24, 2022 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants