From 3eb3a166104d97611b5b32d8e26733786e58df44 Mon Sep 17 00:00:00 2001 From: Steven Collins Date: Wed, 25 Jan 2023 20:24:11 +0100 Subject: [PATCH] fix: add alternative binary names for edge-beta (#25456) Co-authored-by: Emily Rohrbough Co-authored-by: Bill Glesias closes undefined --- cli/CHANGELOG.md | 5 +++++ packages/launcher/__snapshots__/browsers_spec.ts.js | 10 ++++++++-- packages/launcher/__snapshots__/darwin_spec.ts.js | 10 ++++++++-- packages/launcher/__snapshots__/windows_spec.ts.js | 10 ++++++++-- packages/launcher/lib/known-browsers.ts | 4 ++-- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index ae6a8474c753..4f5c34a99fdf 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -3,6 +3,11 @@ _Released 01/31/2023 (PENDING)_ +**Bugfixes:** + +- Fixed an issue where alternative Microsoft Edge Beta and Canary binary names were not being discovered by Cypress. + Fixes [#25455](https://github.com/cypress-io/cypress/issues/25455). + ## 12.4.0 _Released 1/24/2023_ diff --git a/packages/launcher/__snapshots__/browsers_spec.ts.js b/packages/launcher/__snapshots__/browsers_spec.ts.js index 605e5a08a07a..d1c481ea4073 100644 --- a/packages/launcher/__snapshots__/browsers_spec.ts.js +++ b/packages/launcher/__snapshots__/browsers_spec.ts.js @@ -93,7 +93,10 @@ exports['browsers returns the expected list of browsers 1'] = [ "channel": "canary", "displayName": "Edge Canary", "versionRegex": {}, - "binary": "edge-canary", + "binary": [ + "edge-canary", + "microsoft-edge-canary" + ], "minSupportedVersion": 79 }, { @@ -102,7 +105,10 @@ exports['browsers returns the expected list of browsers 1'] = [ "channel": "beta", "displayName": "Edge Beta", "versionRegex": {}, - "binary": "edge-beta", + "binary": [ + "edge-beta", + "microsoft-edge-beta" + ], "minSupportedVersion": 79 }, { diff --git a/packages/launcher/__snapshots__/darwin_spec.ts.js b/packages/launcher/__snapshots__/darwin_spec.ts.js index 211300074bbb..5d3e6a607909 100644 --- a/packages/launcher/__snapshots__/darwin_spec.ts.js +++ b/packages/launcher/__snapshots__/darwin_spec.ts.js @@ -157,7 +157,10 @@ exports['darwin browser detection detects browsers as expected 1'] = [ "channel": "canary", "displayName": "Edge Canary", "versionRegex": {}, - "binary": "edge-canary", + "binary": [ + "edge-canary", + "microsoft-edge-canary" + ], "minSupportedVersion": 79, "path": "/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary", "version": "someVersion", @@ -174,7 +177,10 @@ exports['darwin browser detection detects browsers as expected 1'] = [ "channel": "beta", "displayName": "Edge Beta", "versionRegex": {}, - "binary": "edge-beta", + "binary": [ + "edge-beta", + "microsoft-edge-beta" + ], "minSupportedVersion": 79, "path": "/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta", "version": "someVersion", diff --git a/packages/launcher/__snapshots__/windows_spec.ts.js b/packages/launcher/__snapshots__/windows_spec.ts.js index a13054d2054e..61711f4ee725 100644 --- a/packages/launcher/__snapshots__/windows_spec.ts.js +++ b/packages/launcher/__snapshots__/windows_spec.ts.js @@ -157,7 +157,10 @@ exports['windows browser detection detects browsers as expected 1'] = [ "channel": "canary", "displayName": "Edge Canary", "versionRegex": {}, - "binary": "edge-canary", + "binary": [ + "edge-canary", + "microsoft-edge-canary" + ], "minSupportedVersion": 79, "path": "C:/Users/flotwig/AppData/Local/Microsoft/Edge SxS/Application/msedge.exe", "version": "14", @@ -174,7 +177,10 @@ exports['windows browser detection detects browsers as expected 1'] = [ "channel": "beta", "displayName": "Edge Beta", "versionRegex": {}, - "binary": "edge-beta", + "binary": [ + "edge-beta", + "microsoft-edge-beta" + ], "minSupportedVersion": 79, "path": "C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe", "version": "12", diff --git a/packages/launcher/lib/known-browsers.ts b/packages/launcher/lib/known-browsers.ts index 51ec9bb24dc6..a0b2e83fb13d 100644 --- a/packages/launcher/lib/known-browsers.ts +++ b/packages/launcher/lib/known-browsers.ts @@ -127,7 +127,7 @@ export const knownBrowsers: Browser[] = [ channel: 'canary', displayName: 'Edge Canary', versionRegex: /Microsoft Edge Canary (\S+)/m, - binary: 'edge-canary', + binary: ['edge-canary', 'microsoft-edge-canary'], minSupportedVersion: MIN_EDGE_VERSION, }, { @@ -136,7 +136,7 @@ export const knownBrowsers: Browser[] = [ channel: 'beta', displayName: 'Edge Beta', versionRegex: /Microsoft Edge Beta (\S+)/m, - binary: 'edge-beta', + binary: ['edge-beta', 'microsoft-edge-beta'], minSupportedVersion: MIN_EDGE_VERSION, }, {