From df53cbdc4a666a212eb5be709eb1f3cf275b0629 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Tue, 10 Dec 2024 15:11:36 -0700 Subject: [PATCH 01/18] feat: add support for chrome for testing browser --- .circleci/workflows.yml | 11 ++--- cli/CHANGELOG.md | 6 ++- .../src/assets/browserLogos.ts | 5 +- packages/launcher/lib/darwin/index.ts | 20 ++++++++ packages/launcher/lib/known-browsers.ts | 47 +++++++++++++++---- packages/launcher/lib/windows/index.ts | 12 +++++ 6 files changed, 82 insertions(+), 19 deletions(-) diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 68996b55bf1c..9ed226154c8f 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -30,8 +30,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' - - 'chore/update_reporter_mobx' - - 'publish-binary' + - 'mschile/chrome_for_testing' # usually we don't build Mac app - it takes a long time # but sometimes we want to really confirm we are doing the right thing @@ -42,7 +41,7 @@ macWorkflowFilters: &darwin-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'chore/update_reporter_mobx', << pipeline.git.branch >> ] + - equal: [ 'mschile/chrome_for_testing', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -53,7 +52,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'chore/update_reporter_mobx', << pipeline.git.branch >> ] + - equal: [ 'mschile/chrome_for_testing', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -76,7 +75,7 @@ windowsWorkflowFilters: &windows-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'chore/update_reporter_mobx', << pipeline.git.branch >> ] + - equal: [ 'mschile/chrome_for_testing', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -152,7 +151,7 @@ commands: name: Set environment variable to determine whether or not to persist artifacts command: | echo "Setting SHOULD_PERSIST_ARTIFACTS variable" - echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "chore/update_reporter_mobx" ]]; then + echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "mschile/chrome_for_testing" ]]; then export SHOULD_PERSIST_ARTIFACTS=true fi' >> "$BASH_ENV" # You must run `setup_should_persist_artifacts` command and be using bash before running this command diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 9b233b0d3c42..3c41b928816e 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -1,8 +1,12 @@ -## 13.16.2 +## 13.17.0 _Released 12/17/2024 (PENDING)_ +**Features:** + +- Added support for Google Chrome for Testing browser. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554). + **Bugfixes:** - Fixed an issue where targets may hang if `Network.enable` is not implemented for the target. Addresses [#29876](https://github.com/cypress-io/cypress/issues/29876). diff --git a/packages/frontend-shared/src/assets/browserLogos.ts b/packages/frontend-shared/src/assets/browserLogos.ts index fb572f9c62ac..a53ccfa86bd8 100644 --- a/packages/frontend-shared/src/assets/browserLogos.ts +++ b/packages/frontend-shared/src/assets/browserLogos.ts @@ -16,11 +16,12 @@ import genericBrowserLogo from '@packages/frontend-shared/src/assets/logos/gener export const allBrowsersIcons = { 'Electron': electronIcon, 'Chrome': chromeIcon, + 'Chrome Beta': chromeBetaIcon, + 'Chrome Canary': canaryIcon, + 'Chrome Testing': chromeIcon, 'Firefox': firefoxIcon, 'Edge': edgeIcon, 'Chromium': chromiumIcon, - 'Canary': canaryIcon, - 'Chrome Beta': chromeBetaIcon, 'Firefox Nightly': firefoxNightlyIcon, 'Firefox Developer Edition': firefoxDeveloperEditionIcon, 'Edge Canary': edgeCanaryIcon, diff --git a/packages/launcher/lib/darwin/index.ts b/packages/launcher/lib/darwin/index.ts index caa2500839b3..ca0b57346a2b 100644 --- a/packages/launcher/lib/darwin/index.ts +++ b/packages/launcher/lib/darwin/index.ts @@ -33,6 +33,26 @@ export const browsers: Detectors = { versionProperty: 'KSVersion', }, }, + 'chrome-for-testing': { + stable: { + appName: 'Google Chrome for Testing.app', + executable: 'Contents/MacOS/Google Chrome for Testing', + appId: 'com.google.Chrome', + versionProperty: 'CFBundleShortVersionString', + }, + beta: { + appName: 'Google Chrome for Testing.app', + executable: 'Contents/MacOS/Google Chrome for Testing', + appId: 'com.google.Chrome.beta', + versionProperty: 'CFBundleShortVersionString', + }, + canary: { + appName: 'Google Chrome for Testing.app', + executable: 'Contents/MacOS/Google Chrome for Testing', + appId: 'com.google.Chrome.canary', + versionProperty: 'CFBundleShortVersionString', + }, + }, chromium: { stable: { appName: 'Chromium.app', diff --git a/packages/launcher/lib/known-browsers.ts b/packages/launcher/lib/known-browsers.ts index 53be37e599a1..acd659e58cec 100644 --- a/packages/launcher/lib/known-browsers.ts +++ b/packages/launcher/lib/known-browsers.ts @@ -30,22 +30,39 @@ export const validateMinVersion = (browser: FoundBrowser): BrowserValidatorResul /** list of the browsers we can detect and use by default */ export const knownBrowsers: Browser[] = [ { - name: 'chrome', + name: 'chrome-for-testing', family: 'chromium', channel: 'stable', - displayName: 'Chrome', - versionRegex: /Google Chrome (\S+)/m, - binary: ['google-chrome', 'chrome', 'google-chrome-stable'], + displayName: 'Chrome Testing', + versionRegex: /Google Chrome for Testing (\S+)/m, + binary: ['chrome'], minSupportedVersion: MIN_CHROME_VERSION, }, { - name: 'chromium', + name: 'chrome-for-testing', + family: 'chromium', + channel: 'beta', + displayName: 'Chrome Testing Beta', + versionRegex: /Google Chrome for Testing (\S+)/m, + binary: ['chrome'], + minSupportedVersion: MIN_CHROME_VERSION, + }, + { + name: 'chrome-for-testing', + family: 'chromium', + channel: 'canary', + displayName: 'Chrome Testing Canary', + versionRegex: /Google Chrome for Testing (\S+)/m, + binary: ['chrome'], + minSupportedVersion: MIN_CHROME_VERSION, + }, + { + name: 'chrome', family: 'chromium', - // technically Chromium is always in development channel: 'stable', - displayName: 'Chromium', - versionRegex: /Chromium (\S+)/m, - binary: ['chromium-browser', 'chromium'], + displayName: 'Chrome', + versionRegex: /Google Chrome(?! for Testing) (\S+)/m, + binary: ['google-chrome', 'chrome', 'google-chrome-stable'], minSupportedVersion: MIN_CHROME_VERSION, }, { @@ -61,11 +78,21 @@ export const knownBrowsers: Browser[] = [ name: 'chrome', family: 'chromium', channel: 'canary', - displayName: 'Canary', + displayName: 'Chrome Canary', versionRegex: /Google Chrome Canary (\S+)/m, binary: 'google-chrome-canary', minSupportedVersion: MIN_CHROME_VERSION, }, + { + name: 'chromium', + family: 'chromium', + // technically Chromium is always in development + channel: 'stable', + displayName: 'Chromium', + versionRegex: /Chromium (\S+)/m, + binary: ['chromium-browser', 'chromium'], + minSupportedVersion: MIN_CHROME_VERSION, + }, { name: 'firefox', family: 'firefox', diff --git a/packages/launcher/lib/windows/index.ts b/packages/launcher/lib/windows/index.ts index d0baaedbaccc..a84d697fd7ee 100644 --- a/packages/launcher/lib/windows/index.ts +++ b/packages/launcher/lib/windows/index.ts @@ -46,6 +46,13 @@ function formChromeCanaryAppPath () { return [normalize(exe)] } +function formChromeForTestingAppPath () { + return [ + 'C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', + 'C:/Program Files/Google/Chrome for Testing/chrome.exe', + ].map(normalize) +} + function getFirefoxPaths (editionFolder) { return () => { return (['Program Files', 'Program Files (x86)']) @@ -91,6 +98,11 @@ const formPaths: WindowsBrowserPaths = { beta: formChromeBetaAppPath, canary: formChromeCanaryAppPath, }, + 'chrome-for-testing': { + stable: formChromeForTestingAppPath, + beta: formChromeForTestingAppPath, + canary: formChromeForTestingAppPath, + }, chromium: { stable: formChromiumAppPath, }, From eff8345f1159b4cc811c61e23e28b7a88eab5e07 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Tue, 10 Dec 2024 21:51:38 -0700 Subject: [PATCH 02/18] add disable-infobars --- packages/server/lib/util/chromium_flags.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/lib/util/chromium_flags.ts b/packages/server/lib/util/chromium_flags.ts index eb45e6230fcb..f803725f86c0 100644 --- a/packages/server/lib/util/chromium_flags.ts +++ b/packages/server/lib/util/chromium_flags.ts @@ -36,7 +36,7 @@ const DEFAULT_FLAGS = [ 'enable-automation', 'disable-print-preview', 'disable-component-extensions-with-background-pages', - + 'disable-infobars', 'disable-device-discovery-notifications', // https://github.com/cypress-io/cypress/issues/2376 From 2abfca4af87352638c02c70db2d68d1b1bdfc638 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Wed, 11 Dec 2024 09:10:17 -0700 Subject: [PATCH 03/18] update to use test channel --- .circleci/cache-version.txt | 2 +- .../src/assets/browserLogos.ts | 3 +- packages/launcher/lib/darwin/index.ts | 18 ++-------- packages/launcher/lib/known-browsers.ts | 36 +++++-------------- packages/launcher/lib/windows/index.ts | 6 +--- packages/types/src/browser.ts | 2 +- yarn.lock | 6 ++-- 7 files changed, 19 insertions(+), 54 deletions(-) diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index 1dd4a2276a03..9749f771284c 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,3 +1,3 @@ # Bump this version to force CI to re-create the cache from scratch. -11-5-24 +11-11-24 diff --git a/packages/frontend-shared/src/assets/browserLogos.ts b/packages/frontend-shared/src/assets/browserLogos.ts index a53ccfa86bd8..49e3e477dbe0 100644 --- a/packages/frontend-shared/src/assets/browserLogos.ts +++ b/packages/frontend-shared/src/assets/browserLogos.ts @@ -4,6 +4,7 @@ import edgeIcon from 'browser-logos/src/edge/edge.svg?url' import electronIcon from 'browser-logos/src/electron/electron.svg?url' import canaryIcon from 'browser-logos/src/chrome-canary/chrome-canary.svg?url' import chromeBetaIcon from 'browser-logos/src/chrome-beta/chrome-beta.svg?url' +import chromeTestIcon from 'browser-logos/src/chrome-test/chrome-test.svg?url' import chromiumIcon from 'browser-logos/src/chromium/chromium.svg?url' import edgeBetaIcon from 'browser-logos/src/edge-beta/edge-beta.png' import edgeCanaryIcon from 'browser-logos/src/edge-canary/edge-canary.png' @@ -18,7 +19,7 @@ export const allBrowsersIcons = { 'Chrome': chromeIcon, 'Chrome Beta': chromeBetaIcon, 'Chrome Canary': canaryIcon, - 'Chrome Testing': chromeIcon, + 'Chrome Test': chromeTestIcon, 'Firefox': firefoxIcon, 'Edge': edgeIcon, 'Chromium': chromiumIcon, diff --git a/packages/launcher/lib/darwin/index.ts b/packages/launcher/lib/darwin/index.ts index ca0b57346a2b..6a6d523e9bae 100644 --- a/packages/launcher/lib/darwin/index.ts +++ b/packages/launcher/lib/darwin/index.ts @@ -32,24 +32,10 @@ export const browsers: Detectors = { appId: 'com.google.Chrome.canary', versionProperty: 'KSVersion', }, - }, - 'chrome-for-testing': { - stable: { - appName: 'Google Chrome for Testing.app', - executable: 'Contents/MacOS/Google Chrome for Testing', - appId: 'com.google.Chrome', - versionProperty: 'CFBundleShortVersionString', - }, - beta: { + test: { appName: 'Google Chrome for Testing.app', executable: 'Contents/MacOS/Google Chrome for Testing', - appId: 'com.google.Chrome.beta', - versionProperty: 'CFBundleShortVersionString', - }, - canary: { - appName: 'Google Chrome for Testing.app', - executable: 'Contents/MacOS/Google Chrome for Testing', - appId: 'com.google.Chrome.canary', + appId: 'com.google.chrome.for.testing', versionProperty: 'CFBundleShortVersionString', }, }, diff --git a/packages/launcher/lib/known-browsers.ts b/packages/launcher/lib/known-browsers.ts index acd659e58cec..2bf8937f528f 100644 --- a/packages/launcher/lib/known-browsers.ts +++ b/packages/launcher/lib/known-browsers.ts @@ -29,33 +29,6 @@ export const validateMinVersion = (browser: FoundBrowser): BrowserValidatorResul /** list of the browsers we can detect and use by default */ export const knownBrowsers: Browser[] = [ - { - name: 'chrome-for-testing', - family: 'chromium', - channel: 'stable', - displayName: 'Chrome Testing', - versionRegex: /Google Chrome for Testing (\S+)/m, - binary: ['chrome'], - minSupportedVersion: MIN_CHROME_VERSION, - }, - { - name: 'chrome-for-testing', - family: 'chromium', - channel: 'beta', - displayName: 'Chrome Testing Beta', - versionRegex: /Google Chrome for Testing (\S+)/m, - binary: ['chrome'], - minSupportedVersion: MIN_CHROME_VERSION, - }, - { - name: 'chrome-for-testing', - family: 'chromium', - channel: 'canary', - displayName: 'Chrome Testing Canary', - versionRegex: /Google Chrome for Testing (\S+)/m, - binary: ['chrome'], - minSupportedVersion: MIN_CHROME_VERSION, - }, { name: 'chrome', family: 'chromium', @@ -83,6 +56,15 @@ export const knownBrowsers: Browser[] = [ binary: 'google-chrome-canary', minSupportedVersion: MIN_CHROME_VERSION, }, + { + name: 'chrome', + family: 'chromium', + channel: 'test', + displayName: 'Chrome Test', + versionRegex: /Google Chrome for Testing (\S+)/m, + binary: 'chrome', + minSupportedVersion: MIN_CHROME_VERSION, + }, { name: 'chromium', family: 'chromium', diff --git a/packages/launcher/lib/windows/index.ts b/packages/launcher/lib/windows/index.ts index a84d697fd7ee..b3ab9c252444 100644 --- a/packages/launcher/lib/windows/index.ts +++ b/packages/launcher/lib/windows/index.ts @@ -97,11 +97,7 @@ const formPaths: WindowsBrowserPaths = { stable: formFullAppPath, beta: formChromeBetaAppPath, canary: formChromeCanaryAppPath, - }, - 'chrome-for-testing': { - stable: formChromeForTestingAppPath, - beta: formChromeForTestingAppPath, - canary: formChromeForTestingAppPath, + test: formChromeForTestingAppPath, }, chromium: { stable: formChromiumAppPath, diff --git a/packages/types/src/browser.ts b/packages/types/src/browser.ts index 56b09de14a0e..5831a068b53e 100644 --- a/packages/types/src/browser.ts +++ b/packages/types/src/browser.ts @@ -2,7 +2,7 @@ export const BROWSER_FAMILY = ['chromium', 'firefox', 'webkit'] type BrowserName = 'electron' | 'chrome' | 'chromium' | 'firefox' | 'webkit' | string -export type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | string +export type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | 'test' | string export type BrowserFamily = typeof BROWSER_FAMILY[number] diff --git a/yarn.lock b/yarn.lock index 1d2b449bd04f..54fd388ee376 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10986,8 +10986,8 @@ brorand@^1.0.1, brorand@^1.1.0: integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= "browser-logos@github:alrra/browser-logos": - version "72.0.0" - resolved "https://codeload.github.com/alrra/browser-logos/tar.gz/6e3e6a8da0dc8ec9851a6987fd9bd3523fe1876c" + version "74.1.0" + resolved "https://codeload.github.com/alrra/browser-logos/tar.gz/021a9533c9d872dccf92713f59afb383b29a50eb" browser-resolve@2.0.0: version "2.0.0" @@ -21331,7 +21331,7 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4 dependencies: js-tokens "^3.0.0 || ^4.0.0" -loupe@^2.3.1, loupe@^2.3.6: +loupe@^2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== From 35c24bed29618402a613c89af29e27a38e14fb03 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Wed, 11 Dec 2024 09:53:51 -0700 Subject: [PATCH 04/18] update to new browser --- packages/launcher/lib/darwin/index.ts | 4 +++- packages/launcher/lib/known-browsers.ts | 4 ++-- packages/launcher/lib/windows/index.ts | 4 +++- packages/types/src/browser.ts | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/launcher/lib/darwin/index.ts b/packages/launcher/lib/darwin/index.ts index 6a6d523e9bae..670683932bbd 100644 --- a/packages/launcher/lib/darwin/index.ts +++ b/packages/launcher/lib/darwin/index.ts @@ -32,7 +32,9 @@ export const browsers: Detectors = { appId: 'com.google.Chrome.canary', versionProperty: 'KSVersion', }, - test: { + }, + 'chrome-for-testing': { + stable: { appName: 'Google Chrome for Testing.app', executable: 'Contents/MacOS/Google Chrome for Testing', appId: 'com.google.chrome.for.testing', diff --git a/packages/launcher/lib/known-browsers.ts b/packages/launcher/lib/known-browsers.ts index 2bf8937f528f..600f09e9b416 100644 --- a/packages/launcher/lib/known-browsers.ts +++ b/packages/launcher/lib/known-browsers.ts @@ -57,9 +57,9 @@ export const knownBrowsers: Browser[] = [ minSupportedVersion: MIN_CHROME_VERSION, }, { - name: 'chrome', + name: 'chrome-for-testing', family: 'chromium', - channel: 'test', + channel: 'stable', displayName: 'Chrome Test', versionRegex: /Google Chrome for Testing (\S+)/m, binary: 'chrome', diff --git a/packages/launcher/lib/windows/index.ts b/packages/launcher/lib/windows/index.ts index b3ab9c252444..a215fdfe65f5 100644 --- a/packages/launcher/lib/windows/index.ts +++ b/packages/launcher/lib/windows/index.ts @@ -97,7 +97,9 @@ const formPaths: WindowsBrowserPaths = { stable: formFullAppPath, beta: formChromeBetaAppPath, canary: formChromeCanaryAppPath, - test: formChromeForTestingAppPath, + }, + 'chrome-for-testing': { + stable: formChromeForTestingAppPath, }, chromium: { stable: formChromiumAppPath, diff --git a/packages/types/src/browser.ts b/packages/types/src/browser.ts index 5831a068b53e..56b09de14a0e 100644 --- a/packages/types/src/browser.ts +++ b/packages/types/src/browser.ts @@ -2,7 +2,7 @@ export const BROWSER_FAMILY = ['chromium', 'firefox', 'webkit'] type BrowserName = 'electron' | 'chrome' | 'chromium' | 'firefox' | 'webkit' | string -export type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | 'test' | string +export type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | string export type BrowserFamily = typeof BROWSER_FAMILY[number] From 5ea8fd62aa3abcf9f778f5c98ff9ae21f3f09c02 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Wed, 11 Dec 2024 11:24:32 -0700 Subject: [PATCH 05/18] update yarn.lock file --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 54fd388ee376..50d45b48196b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10986,7 +10986,7 @@ brorand@^1.0.1, brorand@^1.1.0: integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= "browser-logos@github:alrra/browser-logos": - version "74.1.0" + version "75.0.0" resolved "https://codeload.github.com/alrra/browser-logos/tar.gz/021a9533c9d872dccf92713f59afb383b29a50eb" browser-resolve@2.0.0: From faa29846b646f6967bb708622cafbc36b6b2eced Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Wed, 11 Dec 2024 11:40:47 -0700 Subject: [PATCH 06/18] rename appId to bundleId --- packages/launcher/lib/darwin/index.ts | 24 ++++++++++++------------ packages/launcher/lib/darwin/util.ts | 12 ++++++++---- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/packages/launcher/lib/darwin/index.ts b/packages/launcher/lib/darwin/index.ts index 670683932bbd..5ce39651297a 100644 --- a/packages/launcher/lib/darwin/index.ts +++ b/packages/launcher/lib/darwin/index.ts @@ -17,19 +17,19 @@ export const browsers: Detectors = { stable: { appName: 'Google Chrome.app', executable: 'Contents/MacOS/Google Chrome', - appId: 'com.google.Chrome', + bundleId: 'com.google.Chrome', versionProperty: 'KSVersion', }, beta: { appName: 'Google Chrome Beta.app', executable: 'Contents/MacOS/Google Chrome Beta', - appId: 'com.google.Chrome.beta', + bundleId: 'com.google.Chrome.beta', versionProperty: 'KSVersion', }, canary: { appName: 'Google Chrome Canary.app', executable: 'Contents/MacOS/Google Chrome Canary', - appId: 'com.google.Chrome.canary', + bundleId: 'com.google.Chrome.canary', versionProperty: 'KSVersion', }, }, @@ -37,7 +37,7 @@ export const browsers: Detectors = { stable: { appName: 'Google Chrome for Testing.app', executable: 'Contents/MacOS/Google Chrome for Testing', - appId: 'com.google.chrome.for.testing', + bundleId: 'com.google.chrome.for.testing', versionProperty: 'CFBundleShortVersionString', }, }, @@ -45,7 +45,7 @@ export const browsers: Detectors = { stable: { appName: 'Chromium.app', executable: 'Contents/MacOS/Chromium', - appId: 'org.chromium.Chromium', + bundleId: 'org.chromium.Chromium', versionProperty: 'CFBundleShortVersionString', }, }, @@ -53,19 +53,19 @@ export const browsers: Detectors = { stable: { appName: 'Firefox.app', executable: 'Contents/MacOS/firefox', - appId: 'org.mozilla.firefox', + bundleId: 'org.mozilla.firefox', versionProperty: 'CFBundleShortVersionString', }, dev: { appName: 'Firefox Developer Edition.app', executable: 'Contents/MacOS/firefox', - appId: 'org.mozilla.firefoxdeveloperedition', + bundleId: 'org.mozilla.firefoxdeveloperedition', versionProperty: 'CFBundleShortVersionString', }, nightly: { appName: 'Firefox Nightly.app', executable: 'Contents/MacOS/firefox', - appId: 'org.mozilla.nightly', + bundleId: 'org.mozilla.nightly', versionProperty: 'CFBundleShortVersionString', }, }, @@ -73,25 +73,25 @@ export const browsers: Detectors = { stable: { appName: 'Microsoft Edge.app', executable: 'Contents/MacOS/Microsoft Edge', - appId: 'com.microsoft.Edge', + bundleId: 'com.microsoft.Edge', versionProperty: 'CFBundleShortVersionString', }, canary: { appName: 'Microsoft Edge Canary.app', executable: 'Contents/MacOS/Microsoft Edge Canary', - appId: 'com.microsoft.Edge.Canary', + bundleId: 'com.microsoft.Edge.Canary', versionProperty: 'CFBundleShortVersionString', }, beta: { appName: 'Microsoft Edge Beta.app', executable: 'Contents/MacOS/Microsoft Edge Beta', - appId: 'com.microsoft.Edge.Beta', + bundleId: 'com.microsoft.Edge.Beta', versionProperty: 'CFBundleShortVersionString', }, dev: { appName: 'Microsoft Edge Dev.app', executable: 'Contents/MacOS/Microsoft Edge Dev', - appId: 'com.microsoft.Edge.Dev', + bundleId: 'com.microsoft.Edge.Dev', versionProperty: 'CFBundleShortVersionString', }, }, diff --git a/packages/launcher/lib/darwin/util.ts b/packages/launcher/lib/darwin/util.ts index e669682ef38d..2e87bc4b709d 100644 --- a/packages/launcher/lib/darwin/util.ts +++ b/packages/launcher/lib/darwin/util.ts @@ -64,9 +64,13 @@ export type AppInfo = { } export type FindAppParams = { + // The name of the application (e.g. 'Google Chrome.app') appName: string + // The path to the executable within the application (e.g. 'Contents/MacOS/Google Chrome') executable: string - appId: string + // The CFBundleIdentifier in the Info.plist (e.g. 'com.google.Chrome') + bundleId: string + // The key from the Info.plist to find the version (e.g. 'KSVersion') versionProperty: string } @@ -75,8 +79,8 @@ function formApplicationPath (appName: string) { } /** finds an application and its version */ -export function findApp ({ appName, executable, appId, versionProperty }: FindAppParams): Promise { - debugVerbose('looking for app %s id %s', executable, appId) +export function findApp ({ appName, executable, bundleId, versionProperty }: FindAppParams): Promise { + debugVerbose('looking for app %s bundle id %s', executable, bundleId) const findVersion = (foundPath: string) => { return parsePlist(foundPath, versionProperty).then((version) => { @@ -90,7 +94,7 @@ export function findApp ({ appName, executable, appId, versionProperty }: FindAp } const tryMdFind = () => { - return mdfind(appId).then(findVersion) + return mdfind(bundleId).then(findVersion) } const tryFullApplicationFind = () => { From c0a258447a0965867782a0af0ed0f6804d3aa779 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Wed, 11 Dec 2024 14:13:00 -0700 Subject: [PATCH 07/18] updating tests --- .../BROWSER_NOT_FOUND_BY_NAME - canary.html | 7 +- .../BROWSER_NOT_FOUND_BY_NAME.html | 7 +- packages/errors/src/errors.ts | 2 +- .../__snapshots__/browsers_spec.ts.js | 35 +++++--- .../launcher/__snapshots__/darwin_spec.ts.js | 79 ++++++++++------- .../launcher/__snapshots__/windows_spec.ts.js | 85 +++++++++++-------- packages/launcher/test/unit/windows_spec.ts | 8 +- .../cypress/e2e/choose-a-browser.cy.ts | 20 +++-- .../launchpad/cypress/e2e/project-setup.cy.ts | 6 +- .../e2e/system-tests/config-spec.cy.ts | 2 +- .../component_testing_spec.ts.js | 4 +- system-tests/__snapshots__/retries_spec.ts.js | 4 +- .../vite_dev_server_fresh_spec.ts.js | 70 +++++++-------- .../webpack_dev_server_fresh_spec.ts.js | 70 +++++++-------- .../cypress/e2e/default_size.cy.js | 2 +- 15 files changed, 227 insertions(+), 174 deletions(-) diff --git a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html index 95f021d5471a..e28e040ca041 100644 --- a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html +++ b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html @@ -42,7 +42,7 @@ - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox @@ -50,9 +50,10 @@ Available browsers found on your system are: - chrome - - chromium - chrome:beta - chrome:canary + - chrome-for-testing + - chromium - firefox - firefox:dev - firefox:nightly @@ -63,5 +64,5 @@ Note: In Cypress version 4.0.0, Canary must be launched as chrome:canary, not canary. -See https://on.cypress.io/migration-guide for more information on breaking changes in 4.0.0. +See https://on.cypress.io/migration-guide for more information on breaking changes in 4.0.0. \ No newline at end of file diff --git a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html index d29ace7a0dc5..c8ab0a7a8b96 100644 --- a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html +++ b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html @@ -42,7 +42,7 @@ - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox @@ -50,14 +50,15 @@ Available browsers found on your system are: - chrome - - chromium - chrome:beta - chrome:canary + - chrome-for-testing + - chromium - firefox - firefox:dev - firefox:nightly - edge - edge:canary - edge:beta - - edge:dev + - edge:dev \ No newline at end of file diff --git a/packages/errors/src/errors.ts b/packages/errors/src/errors.ts index d0db72e6967a..63cf017b3caf 100644 --- a/packages/errors/src/errors.ts +++ b/packages/errors/src/errors.ts @@ -120,7 +120,7 @@ export const AllCypressErrors = { Browser: ${fmt.highlight(browser)} was not found on your system or is not supported by Cypress. Cypress supports the following browsers: - ${fmt.listItems(['electron', 'chrome', 'chromium', 'chrome:canary', 'edge', 'firefox'])} + ${fmt.listItems(['electron', 'chrome', 'chromium', 'chrome-for-testing', 'edge', 'firefox'])} You can also use a custom browser: https://on.cypress.io/customize-browsers diff --git a/packages/launcher/__snapshots__/browsers_spec.ts.js b/packages/launcher/__snapshots__/browsers_spec.ts.js index 41bc8b32e916..09272f5342db 100644 --- a/packages/launcher/__snapshots__/browsers_spec.ts.js +++ b/packages/launcher/__snapshots__/browsers_spec.ts.js @@ -12,18 +12,6 @@ exports['browsers returns the expected list of browsers 1'] = [ ], 'minSupportedVersion': 64, }, - { - 'name': 'chromium', - 'family': 'chromium', - 'channel': 'stable', - 'displayName': 'Chromium', - 'versionRegex': {}, - 'binary': [ - 'chromium-browser', - 'chromium', - ], - 'minSupportedVersion': 64, - }, { 'name': 'chrome', 'family': 'chromium', @@ -37,11 +25,32 @@ exports['browsers returns the expected list of browsers 1'] = [ 'name': 'chrome', 'family': 'chromium', 'channel': 'canary', - 'displayName': 'Canary', + 'displayName': 'Chrome Canary', 'versionRegex': {}, 'binary': 'google-chrome-canary', 'minSupportedVersion': 64, }, + { + 'name': 'chrome-for-testing', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome Test', + 'versionRegex': {}, + 'binary': 'chrome', + 'minSupportedVersion': 64, + }, + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + }, { 'name': 'firefox', 'family': 'firefox', diff --git a/packages/launcher/__snapshots__/darwin_spec.ts.js b/packages/launcher/__snapshots__/darwin_spec.ts.js index 4cd70c8c8c14..3d45403e6cf1 100644 --- a/packages/launcher/__snapshots__/darwin_spec.ts.js +++ b/packages/launcher/__snapshots__/darwin_spec.ts.js @@ -16,30 +16,10 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome.app', 'executable': 'Contents/MacOS/Google Chrome', - 'appId': 'com.google.Chrome', + 'bundleId': 'com.google.Chrome', 'versionProperty': 'KSVersion', }, }, - { - 'name': 'chromium', - 'family': 'chromium', - 'channel': 'stable', - 'displayName': 'Chromium', - 'versionRegex': {}, - 'binary': [ - 'chromium-browser', - 'chromium', - ], - 'minSupportedVersion': 64, - 'path': '/Applications/Chromium.app/Contents/MacOS/Chromium', - 'version': 'someVersion', - 'findAppParams': { - 'appName': 'Chromium.app', - 'executable': 'Contents/MacOS/Chromium', - 'appId': 'org.chromium.Chromium', - 'versionProperty': 'CFBundleShortVersionString', - }, - }, { 'name': 'chrome', 'family': 'chromium', @@ -53,7 +33,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome Beta.app', 'executable': 'Contents/MacOS/Google Chrome Beta', - 'appId': 'com.google.Chrome.beta', + 'bundleId': 'com.google.Chrome.beta', 'versionProperty': 'KSVersion', }, }, @@ -61,7 +41,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'name': 'chrome', 'family': 'chromium', 'channel': 'canary', - 'displayName': 'Canary', + 'displayName': 'Chrome Canary', 'versionRegex': {}, 'binary': 'google-chrome-canary', 'minSupportedVersion': 64, @@ -70,10 +50,47 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome Canary.app', 'executable': 'Contents/MacOS/Google Chrome Canary', - 'appId': 'com.google.Chrome.canary', + 'bundleId': 'com.google.Chrome.canary', 'versionProperty': 'KSVersion', }, }, + { + 'name': 'chrome-for-testing', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome Test', + 'versionRegex': {}, + 'binary': 'chrome', + 'minSupportedVersion': 64, + 'path': '/Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing', + 'version': 'someVersion', + 'findAppParams': { + 'appName': 'Google Chrome for Testing.app', + 'executable': 'Contents/MacOS/Google Chrome for Testing', + 'bundleId': 'com.google.chrome.for.testing', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': '/Applications/Chromium.app/Contents/MacOS/Chromium', + 'version': 'someVersion', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, { 'name': 'firefox', 'family': 'firefox', @@ -87,7 +104,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefox', + 'bundleId': 'org.mozilla.firefox', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -107,7 +124,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox Developer Edition.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefoxdeveloperedition', + 'bundleId': 'org.mozilla.firefoxdeveloperedition', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -127,7 +144,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox Nightly.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.nightly', + 'bundleId': 'org.mozilla.nightly', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -147,7 +164,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge.app', 'executable': 'Contents/MacOS/Microsoft Edge', - 'appId': 'com.microsoft.Edge', + 'bundleId': 'com.microsoft.Edge', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -167,7 +184,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge Canary.app', 'executable': 'Contents/MacOS/Microsoft Edge Canary', - 'appId': 'com.microsoft.Edge.Canary', + 'bundleId': 'com.microsoft.Edge.Canary', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -187,7 +204,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge Beta.app', 'executable': 'Contents/MacOS/Microsoft Edge Beta', - 'appId': 'com.microsoft.Edge.Beta', + 'bundleId': 'com.microsoft.Edge.Beta', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -207,7 +224,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge Dev.app', 'executable': 'Contents/MacOS/Microsoft Edge Dev', - 'appId': 'com.microsoft.Edge.Dev', + 'bundleId': 'com.microsoft.Edge.Dev', 'versionProperty': 'CFBundleShortVersionString', }, }, diff --git a/packages/launcher/__snapshots__/windows_spec.ts.js b/packages/launcher/__snapshots__/windows_spec.ts.js index 0ba7dfb13388..828ee8d12e9b 100644 --- a/packages/launcher/__snapshots__/windows_spec.ts.js +++ b/packages/launcher/__snapshots__/windows_spec.ts.js @@ -16,30 +16,10 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome.app', 'executable': 'Contents/MacOS/Google Chrome', - 'appId': 'com.google.Chrome', + 'bundleId': 'com.google.Chrome', 'versionProperty': 'KSVersion', }, }, - { - 'name': 'chromium', - 'family': 'chromium', - 'channel': 'stable', - 'displayName': 'Chromium', - 'versionRegex': {}, - 'binary': [ - 'chromium-browser', - 'chromium', - ], - 'minSupportedVersion': 64, - 'path': 'C:/Program Files (x86)/Google/chrome-win32/chrome.exe', - 'version': '2.3.4', - 'findAppParams': { - 'appName': 'Chromium.app', - 'executable': 'Contents/MacOS/Chromium', - 'appId': 'org.chromium.Chromium', - 'versionProperty': 'CFBundleShortVersionString', - }, - }, { 'name': 'chrome', 'family': 'chromium', @@ -53,7 +33,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome Beta.app', 'executable': 'Contents/MacOS/Google Chrome Beta', - 'appId': 'com.google.Chrome.beta', + 'bundleId': 'com.google.Chrome.beta', 'versionProperty': 'KSVersion', }, }, @@ -61,7 +41,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'name': 'chrome', 'family': 'chromium', 'channel': 'canary', - 'displayName': 'Canary', + 'displayName': 'Chrome Canary', 'versionRegex': {}, 'binary': 'google-chrome-canary', 'minSupportedVersion': 64, @@ -70,10 +50,47 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome Canary.app', 'executable': 'Contents/MacOS/Google Chrome Canary', - 'appId': 'com.google.Chrome.canary', + 'bundleId': 'com.google.Chrome.canary', 'versionProperty': 'KSVersion', }, }, + { + 'name': 'chrome-for-testing', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome Test', + 'versionRegex': {}, + 'binary': 'chrome', + 'minSupportedVersion': 64, + 'path': 'C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', + 'version': '1.2.3', + 'findAppParams': { + 'appName': 'Google Chrome for Testing.app', + 'executable': 'Contents/MacOS/Google Chrome for Testing', + 'bundleId': 'com.google.chrome.for.testing', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files (x86)/Google/chrome-win32/chrome.exe', + 'version': '2.3.4', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, { 'name': 'firefox', 'family': 'firefox', @@ -87,7 +104,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefox', + 'bundleId': 'org.mozilla.firefox', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -107,7 +124,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox Developer Edition.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefoxdeveloperedition', + 'bundleId': 'org.mozilla.firefoxdeveloperedition', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -127,7 +144,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox Nightly.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.nightly', + 'bundleId': 'org.mozilla.nightly', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -147,7 +164,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge.app', 'executable': 'Contents/MacOS/Microsoft Edge', - 'appId': 'com.microsoft.Edge', + 'bundleId': 'com.microsoft.Edge', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -167,7 +184,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge Canary.app', 'executable': 'Contents/MacOS/Microsoft Edge Canary', - 'appId': 'com.microsoft.Edge.Canary', + 'bundleId': 'com.microsoft.Edge.Canary', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -187,7 +204,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge Beta.app', 'executable': 'Contents/MacOS/Microsoft Edge Beta', - 'appId': 'com.microsoft.Edge.Beta', + 'bundleId': 'com.microsoft.Edge.Beta', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -207,7 +224,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge Dev.app', 'executable': 'Contents/MacOS/Microsoft Edge Dev', - 'appId': 'com.microsoft.Edge.Dev', + 'bundleId': 'com.microsoft.Edge.Dev', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -239,7 +256,7 @@ exports['windows browser detection detects local Firefox installs 1'] = [ 'findAppParams': { 'appName': 'Firefox.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefox', + 'bundleId': 'org.mozilla.firefox', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -259,7 +276,7 @@ exports['windows browser detection detects local Firefox installs 1'] = [ 'findAppParams': { 'appName': 'Firefox Developer Edition.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefoxdeveloperedition', + 'bundleId': 'org.mozilla.firefoxdeveloperedition', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -279,7 +296,7 @@ exports['windows browser detection detects local Firefox installs 1'] = [ 'findAppParams': { 'appName': 'Firefox Nightly.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.nightly', + 'bundleId': 'org.mozilla.nightly', 'versionProperty': 'CFBundleShortVersionString', }, }, diff --git a/packages/launcher/test/unit/windows_spec.ts b/packages/launcher/test/unit/windows_spec.ts index 27b826fe99d0..9566538e7af7 100644 --- a/packages/launcher/test/unit/windows_spec.ts +++ b/packages/launcher/test/unit/windows_spec.ts @@ -43,12 +43,18 @@ describe('windows browser detection', () => { }) it('detects browsers as expected', async () => { + // chrome stubBrowser('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', '1.2.3') + // chromium stubBrowser('C:/Program Files (x86)/Google/chrome-win32/chrome.exe', '2.3.4') + // chrome-for-testing + stubBrowser('C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', '1.2.3') + stubBrowser('C:/Program Files/Google/Chrome for Testing/chrome.exe', '1.2.3') + // chrome beta stubBrowser('C:/Program Files (x86)/Google/Chrome Beta/Application/chrome.exe', '6.7.8') - // canary is installed in homedir + // chrome canary is installed in homedir stubBrowser(`${HOMEDIR}/AppData/Local/Google/Chrome SxS/Application/chrome.exe`, '3.4.5') // have 32-bit and 64-bit ff - 64-bit will be preferred diff --git a/packages/launchpad/cypress/e2e/choose-a-browser.cy.ts b/packages/launchpad/cypress/e2e/choose-a-browser.cy.ts index 94858029ccd2..cd3e4d42c7bd 100644 --- a/packages/launchpad/cypress/e2e/choose-a-browser.cy.ts +++ b/packages/launchpad/cypress/e2e/choose-a-browser.cy.ts @@ -46,7 +46,7 @@ describe('Choose a browser page', () => { cy.get('h1').should('contain', 'Choose a browser') - cy.findByRole('radio', { name: 'Edge v8', checked: true }) + cy.findByRole('radio', { name: 'Edge v9', checked: true }) cy.percySnapshot() @@ -103,8 +103,10 @@ describe('Choose a browser page', () => { // varies depending on platform if (Cypress.platform === 'win32') { cy.get('@AlertBody').find('code').eq(1).should('have.text', `win-version-info is unable to access file: \\${path.replaceAll('/', '\\')}`) - } else { + } else if (Cypress.platform === 'linux') { cy.get('@AlertBody').find('code').eq(1).should('have.text', `spawn ${path} ENOENT`) + } else { + cy.get('@AlertBody').find('code').eq(1).should('have.text', `Unable to find browser with path ${path}`) } cy.percySnapshot() @@ -127,11 +129,11 @@ describe('Choose a browser page', () => { cy.findByRole('radio', { name: 'Chrome v1' }) - cy.findByRole('radio', { name: 'Firefox v5' }) + cy.findByRole('radio', { name: 'Firefox v6' }) - cy.findByRole('radio', { name: 'Electron v12' }) + cy.findByRole('radio', { name: 'Electron v13' }) - cy.findByRole('radio', { name: 'Edge v8' }) + cy.findByRole('radio', { name: 'Edge v9' }) }) it('performs mutation to launch selected browser when launch button is pressed', () => { @@ -194,7 +196,7 @@ describe('Choose a browser page', () => { cy.get('h1').should('contain', 'Choose a browser') cy.findByRole('radio', { name: 'Chrome v1', checked: true }).as('chromeItem') - cy.findByRole('radio', { name: 'Firefox v5', checked: false }).as('firefoxItem') + cy.findByRole('radio', { name: 'Firefox v6', checked: false }).as('firefoxItem') cy.contains('button', 'Start E2E Testing in Chrome').should('be.visible') @@ -205,7 +207,7 @@ describe('Choose a browser page', () => { }) cy.findByRole('radio', { name: 'Chrome v1', checked: false }) - cy.findByRole('radio', { name: 'Firefox v5', checked: true }) + cy.findByRole('radio', { name: 'Firefox v6', checked: true }) cy.contains('button', 'Start E2E Testing in Firefox').should('be.visible') }) @@ -323,7 +325,7 @@ describe('Choose a browser page', () => { }) cy.contains('button', 'Start E2E Testing in Firefox').should('be.visible') - cy.findByRole('radio', { name: 'Firefox v5', checked: true }).should('be.visible') + cy.findByRole('radio', { name: 'Firefox v6', checked: true }).should('be.visible') }) it('should return to welcome screen if user modifies the config file to not include the current testing type and recover', () => { @@ -371,7 +373,7 @@ describe('Choose a browser page', () => { cy.get('[data-cy="open-browser-list"]').children().should('have.length', 1) - cy.findByRole('radio', { name: 'Electron v12', checked: true }) + cy.findByRole('radio', { name: 'Electron v13', checked: true }) cy.percySnapshot() }) }) diff --git a/packages/launchpad/cypress/e2e/project-setup.cy.ts b/packages/launchpad/cypress/e2e/project-setup.cy.ts index 62cb67118e1f..e36de4ff2251 100644 --- a/packages/launchpad/cypress/e2e/project-setup.cy.ts +++ b/packages/launchpad/cypress/e2e/project-setup.cy.ts @@ -61,9 +61,9 @@ describe('Launchpad: Setup Project', () => { cy.contains('Choose a browser', { timeout: 15000 }) cy.findByRole('radio', { name: 'Chrome v1' }) - cy.findByRole('radio', { name: 'Firefox v5' }) - cy.findByRole('radio', { name: 'Electron v12' }) - cy.findByRole('radio', { name: 'Edge v8' }) + cy.findByRole('radio', { name: 'Firefox v6' }) + cy.findByRole('radio', { name: 'Electron v13' }) + cy.findByRole('radio', { name: 'Edge v9' }) } beforeEach(() => { diff --git a/packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts b/packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts index 5bcf02a12687..ec2355c043c3 100644 --- a/packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts +++ b/packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts @@ -4,7 +4,7 @@ describe('config-spec', () => { cy.findBrowsers() cy.openProject('plugin-filter-browsers', ['--e2e']) cy.withCtx(async (ctx) => { - expect(await ctx.browser.machineBrowsers()).to.have.length(12) // stubbed list of all browsers + expect(await ctx.browser.machineBrowsers()).to.have.length(13) // stubbed list of all browsers }) cy.visitLaunchpad() diff --git a/system-tests/__snapshots__/component_testing_spec.ts.js b/system-tests/__snapshots__/component_testing_spec.ts.js index bc6660da8df6..e3531e039403 100644 --- a/system-tests/__snapshots__/component_testing_spec.ts.js +++ b/system-tests/__snapshots__/component_testing_spec.ts.js @@ -786,9 +786,9 @@ exports['experimentalSingleTabRunMode / executes all specs in a single tab'] = ` (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/1_fails.cy.js/simple failing spec -- fails (fai (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/1_fails.cy.js/simple failing spec -- fails (fai (1280x633) led).png - - /XXX/XXX/XXX/cypress/screenshots/1_fails.cy.js/simple failing spec -- fails agai (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/1_fails.cy.js/simple failing spec -- fails agai (1280x633) n (failed).png diff --git a/system-tests/__snapshots__/retries_spec.ts.js b/system-tests/__snapshots__/retries_spec.ts.js index d88ae5dc7b63..9e99c236d055 100644 --- a/system-tests/__snapshots__/retries_spec.ts.js +++ b/system-tests/__snapshots__/retries_spec.ts.js @@ -164,8 +164,8 @@ exports['retries / supports retries (chrome)'] = ` (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/fail-twice.cy.js/fail twice (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/fail-twice.cy.js/fail twice (failed) (attempt 2 (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/fail-twice.cy.js/fail twice (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/fail-twice.cy.js/fail twice (failed) (attempt 2 (1280x633) ).png diff --git a/system-tests/__snapshots__/vite_dev_server_fresh_spec.ts.js b/system-tests/__snapshots__/vite_dev_server_fresh_spec.ts.js index 5cc5e74d4ce5..bf914585b152 100644 --- a/system-tests/__snapshots__/vite_dev_server_fresh_spec.ts.js +++ b/system-tests/__snapshots__/vite_dev_server_fresh_spec.ts.js @@ -82,7 +82,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -165,12 +165,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -216,7 +216,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -254,7 +254,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -485,7 +485,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -568,12 +568,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -619,7 +619,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -657,7 +657,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -888,7 +888,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -971,12 +971,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -1022,7 +1022,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -1060,7 +1060,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -1291,7 +1291,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -1374,12 +1374,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -1425,7 +1425,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -1463,7 +1463,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -1906,7 +1906,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -1989,12 +1989,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -2040,7 +2040,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -2078,7 +2078,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png diff --git a/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js b/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js index 2af0d08c8e6f..b72a31f49c1b 100644 --- a/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js +++ b/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js @@ -321,7 +321,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -404,12 +404,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -455,7 +455,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -493,7 +493,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -744,7 +744,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -827,12 +827,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -878,7 +878,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -916,7 +916,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -1158,7 +1158,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -1241,12 +1241,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -1292,7 +1292,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -1330,7 +1330,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -1584,7 +1584,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -1667,12 +1667,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -1718,7 +1718,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -1756,7 +1756,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -2027,7 +2027,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -2110,12 +2110,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -2161,7 +2161,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -2199,7 +2199,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png diff --git a/system-tests/projects/screen-size/cypress/e2e/default_size.cy.js b/system-tests/projects/screen-size/cypress/e2e/default_size.cy.js index 0c60218985d1..db3a89a0f800 100644 --- a/system-tests/projects/screen-size/cypress/e2e/default_size.cy.js +++ b/system-tests/projects/screen-size/cypress/e2e/default_size.cy.js @@ -16,7 +16,7 @@ describe('windowSize', () => { // availHeight: top.screen.availHeight, }).deep.eq({ innerWidth: 1280, - innerHeight: 581, // chrome 128 decreased the size here from 633 to 581 + innerHeight: 633, // chrome 119 increased the size here from 599 to 633 // screenWidth: 1280, // screenHeight: 603, // availWidth: 1280, From bdbb96fb7c371a4889028162cb11c88539cf930f Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Wed, 11 Dec 2024 15:15:48 -0700 Subject: [PATCH 08/18] fixing tests --- packages/app/cypress/e2e/top-nav.cy.ts | 8 ++++---- packages/server/__snapshots__/browsers_spec.js | 4 ++-- system-tests/__snapshots__/plugins_spec.js | 2 +- system-tests/__snapshots__/record_spec.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/app/cypress/e2e/top-nav.cy.ts b/packages/app/cypress/e2e/top-nav.cy.ts index 417642390f05..52ec9e8d7b03 100644 --- a/packages/app/cypress/e2e/top-nav.cy.ts +++ b/packages/app/cypress/e2e/top-nav.cy.ts @@ -44,7 +44,7 @@ describe('App Top Nav Workflows', () => { .should('have.attr', 'src') .and('contain', 'firefox') - cy.findByTestId('top-nav-active-browser').should('contain', 'Firefox 5') + cy.findByTestId('top-nav-active-browser').should('contain', 'Firefox 6') }) }) @@ -82,19 +82,19 @@ describe('App Top Nav Workflows', () => { cy.get('@browserItems').eq(1) .should('contain', 'Edge') - .and('contain', 'Version 8') + .and('contain', 'Version 9') .findByTestId('top-nav-browser-list-selected-item') .should('not.exist') cy.get('@browserItems').eq(2) .should('contain', 'Electron') - .and('contain', 'Version 12') + .and('contain', 'Version 13') .findByTestId('top-nav-browser-list-selected-item') .should('not.exist') cy.get('@browserItems').eq(3) .should('contain', 'Firefox') - .and('contain', 'Version 5') + .and('contain', 'Version 6') .findByTestId('top-nav-browser-list-selected-item') .should('not.exist') }) diff --git a/packages/server/__snapshots__/browsers_spec.js b/packages/server/__snapshots__/browsers_spec.js index 4d9e8283e385..f5992d0d363a 100644 --- a/packages/server/__snapshots__/browsers_spec.js +++ b/packages/server/__snapshots__/browsers_spec.js @@ -7,7 +7,7 @@ Cypress supports the following browsers: - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox @@ -28,7 +28,7 @@ Cypress supports the following browsers: - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox diff --git a/system-tests/__snapshots__/plugins_spec.js b/system-tests/__snapshots__/plugins_spec.js index 4cd267e25f59..afc98d06d7b4 100644 --- a/system-tests/__snapshots__/plugins_spec.js +++ b/system-tests/__snapshots__/plugins_spec.js @@ -7,7 +7,7 @@ Cypress supports the following browsers: - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox diff --git a/system-tests/__snapshots__/record_spec.js b/system-tests/__snapshots__/record_spec.js index d837ef612fe9..beb05d75a328 100644 --- a/system-tests/__snapshots__/record_spec.js +++ b/system-tests/__snapshots__/record_spec.js @@ -556,7 +556,7 @@ Cypress supports the following browsers: - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox From ba44fa8405840eb302d147169416a61958852d66 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Thu, 12 Dec 2024 10:31:31 -0700 Subject: [PATCH 09/18] spec updates --- cli/CHANGELOG.md | 2 +- .../__snapshots__/browsers_spec.ts.js | 16 +-- .../launcher/__snapshots__/darwin_spec.ts.js | 32 ++--- .../launcher/__snapshots__/windows_spec.ts.js | 112 +++++++++++++----- packages/launcher/lib/known-browsers.ts | 16 +-- packages/launcher/lib/windows/index.ts | 2 +- packages/launcher/test/unit/darwin_spec.ts | 2 +- packages/launcher/test/unit/windows_spec.ts | 23 ++-- 8 files changed, 132 insertions(+), 73 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 1862b4c6b5c8..604d62a36988 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -5,7 +5,7 @@ _Released 12/17/2024 (PENDING)_ **Features:** -- Added support for Google Chrome for Testing browser. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554). +- Added official support for Google Chrome for Testing browser. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554). **Bugfixes:** diff --git a/packages/launcher/__snapshots__/browsers_spec.ts.js b/packages/launcher/__snapshots__/browsers_spec.ts.js index 09272f5342db..b2b76862ca38 100644 --- a/packages/launcher/__snapshots__/browsers_spec.ts.js +++ b/packages/launcher/__snapshots__/browsers_spec.ts.js @@ -99,24 +99,24 @@ exports['browsers returns the expected list of browsers 1'] = [ { 'name': 'edge', 'family': 'chromium', - 'channel': 'canary', - 'displayName': 'Edge Canary', + 'channel': 'beta', + 'displayName': 'Edge Beta', 'versionRegex': {}, 'binary': [ - 'edge-canary', - 'microsoft-edge-canary', + 'edge-beta', + 'microsoft-edge-beta', ], 'minSupportedVersion': 79, }, { 'name': 'edge', 'family': 'chromium', - 'channel': 'beta', - 'displayName': 'Edge Beta', + 'channel': 'canary', + 'displayName': 'Edge Canary', 'versionRegex': {}, 'binary': [ - 'edge-beta', - 'microsoft-edge-beta', + 'edge-canary', + 'microsoft-edge-canary', ], 'minSupportedVersion': 79, }, diff --git a/packages/launcher/__snapshots__/darwin_spec.ts.js b/packages/launcher/__snapshots__/darwin_spec.ts.js index 3d45403e6cf1..2ea43b69c8be 100644 --- a/packages/launcher/__snapshots__/darwin_spec.ts.js +++ b/packages/launcher/__snapshots__/darwin_spec.ts.js @@ -171,40 +171,40 @@ exports['darwin browser detection detects browsers as expected 1'] = [ { 'name': 'edge', 'family': 'chromium', - 'channel': 'canary', - 'displayName': 'Edge Canary', + 'channel': 'beta', + 'displayName': 'Edge Beta', 'versionRegex': {}, 'binary': [ - 'edge-canary', - 'microsoft-edge-canary', + 'edge-beta', + 'microsoft-edge-beta', ], 'minSupportedVersion': 79, - 'path': '/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary', + 'path': '/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta', 'version': 'someVersion', 'findAppParams': { - 'appName': 'Microsoft Edge Canary.app', - 'executable': 'Contents/MacOS/Microsoft Edge Canary', - 'bundleId': 'com.microsoft.Edge.Canary', + 'appName': 'Microsoft Edge Beta.app', + 'executable': 'Contents/MacOS/Microsoft Edge Beta', + 'bundleId': 'com.microsoft.Edge.Beta', 'versionProperty': 'CFBundleShortVersionString', }, }, { 'name': 'edge', 'family': 'chromium', - 'channel': 'beta', - 'displayName': 'Edge Beta', + 'channel': 'canary', + 'displayName': 'Edge Canary', 'versionRegex': {}, 'binary': [ - 'edge-beta', - 'microsoft-edge-beta', + 'edge-canary', + 'microsoft-edge-canary', ], 'minSupportedVersion': 79, - 'path': '/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta', + 'path': '/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary', 'version': 'someVersion', 'findAppParams': { - 'appName': 'Microsoft Edge Beta.app', - 'executable': 'Contents/MacOS/Microsoft Edge Beta', - 'bundleId': 'com.microsoft.Edge.Beta', + 'appName': 'Microsoft Edge Canary.app', + 'executable': 'Contents/MacOS/Microsoft Edge Canary', + 'bundleId': 'com.microsoft.Edge.Canary', 'versionProperty': 'CFBundleShortVersionString', }, }, diff --git a/packages/launcher/__snapshots__/windows_spec.ts.js b/packages/launcher/__snapshots__/windows_spec.ts.js index 828ee8d12e9b..c081762a91d7 100644 --- a/packages/launcher/__snapshots__/windows_spec.ts.js +++ b/packages/launcher/__snapshots__/windows_spec.ts.js @@ -62,7 +62,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'versionRegex': {}, 'binary': 'chrome', 'minSupportedVersion': 64, - 'path': 'C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', + 'path': 'C:/Program Files/Google/Chrome for Testing/chrome.exe', 'version': '1.2.3', 'findAppParams': { 'appName': 'Google Chrome for Testing.app', @@ -171,40 +171,40 @@ exports['windows browser detection detects browsers as expected 1'] = [ { 'name': 'edge', 'family': 'chromium', - 'channel': 'canary', - 'displayName': 'Edge Canary', + 'channel': 'beta', + 'displayName': 'Edge Beta', 'versionRegex': {}, 'binary': [ - 'edge-canary', - 'microsoft-edge-canary', + 'edge-beta', + 'microsoft-edge-beta', ], 'minSupportedVersion': 79, - 'path': 'C:/Users/flotwig/AppData/Local/Microsoft/Edge SxS/Application/msedge.exe', - 'version': '14', + 'path': 'C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe', + 'version': '12', 'findAppParams': { - 'appName': 'Microsoft Edge Canary.app', - 'executable': 'Contents/MacOS/Microsoft Edge Canary', - 'bundleId': 'com.microsoft.Edge.Canary', + 'appName': 'Microsoft Edge Beta.app', + 'executable': 'Contents/MacOS/Microsoft Edge Beta', + 'bundleId': 'com.microsoft.Edge.Beta', 'versionProperty': 'CFBundleShortVersionString', }, }, { 'name': 'edge', 'family': 'chromium', - 'channel': 'beta', - 'displayName': 'Edge Beta', + 'channel': 'canary', + 'displayName': 'Edge Canary', 'versionRegex': {}, 'binary': [ - 'edge-beta', - 'microsoft-edge-beta', + 'edge-canary', + 'microsoft-edge-canary', ], 'minSupportedVersion': 79, - 'path': 'C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe', - 'version': '12', + 'path': 'C:/Users/flotwig/AppData/Local/Microsoft/Edge SxS/Application/msedge.exe', + 'version': '14', 'findAppParams': { - 'appName': 'Microsoft Edge Beta.app', - 'executable': 'Contents/MacOS/Microsoft Edge Beta', - 'bundleId': 'com.microsoft.Edge.Beta', + 'appName': 'Microsoft Edge Canary.app', + 'executable': 'Contents/MacOS/Microsoft Edge Canary', + 'bundleId': 'com.microsoft.Edge.Canary', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -230,19 +230,71 @@ exports['windows browser detection detects browsers as expected 1'] = [ }, ] -exports['windows browser detection detects 64-bit Chrome Beta app path 1'] = { - 'name': 'chrome', - 'version': '9.0.1', - 'path': 'C:/Program Files/Google/Chrome Beta/Application/chrome.exe', -} +exports['windows browser detection detects Chrome Beta 64-bit install 1'] = [ + { + 'name': 'chrome', + 'family': 'chromium', + 'channel': 'beta', + 'displayName': 'Chrome Beta', + 'versionRegex': {}, + 'binary': 'google-chrome-beta', + 'minSupportedVersion': 64, + 'path': 'C:/Program Files/Google/Chrome Beta/Application/chrome.exe', + 'version': '9.0.1', + 'findAppParams': { + 'appName': 'Google Chrome Beta.app', + 'executable': 'Contents/MacOS/Google Chrome Beta', + 'bundleId': 'com.google.Chrome.beta', + 'versionProperty': 'KSVersion', + }, + }, +] -exports['windows browser detection detects new Chrome 64-bit app path 1'] = { - 'name': 'chrome', - 'version': '4.4.4', - 'path': 'C:/Program Files/Google/Chrome/Application/chrome.exe', -} +exports['windows browser detection detects Chrome 64-bit install 1'] = [ + { + 'name': 'chrome', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome', + 'versionRegex': {}, + 'binary': [ + 'google-chrome', + 'chrome', + 'google-chrome-stable', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files/Google/Chrome/Application/chrome.exe', + 'version': '4.4.4', + 'findAppParams': { + 'appName': 'Google Chrome.app', + 'executable': 'Contents/MacOS/Google Chrome', + 'bundleId': 'com.google.Chrome', + 'versionProperty': 'KSVersion', + }, + }, +] + +exports['windows browser detection detects Chrome for Testing 32-bit install 1'] = [ + { + 'name': 'chrome-for-testing', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome Test', + 'versionRegex': {}, + 'binary': 'chrome', + 'minSupportedVersion': 64, + 'path': 'C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', + 'version': '5.5.5', + 'findAppParams': { + 'appName': 'Google Chrome for Testing.app', + 'executable': 'Contents/MacOS/Google Chrome for Testing', + 'bundleId': 'com.google.chrome.for.testing', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, +] -exports['windows browser detection detects local Firefox installs 1'] = [ +exports['windows browser detection detects Firefox local installs 1'] = [ { 'name': 'firefox', 'family': 'firefox', diff --git a/packages/launcher/lib/known-browsers.ts b/packages/launcher/lib/known-browsers.ts index 600f09e9b416..154301e31c58 100644 --- a/packages/launcher/lib/known-browsers.ts +++ b/packages/launcher/lib/known-browsers.ts @@ -133,19 +133,19 @@ export const knownBrowsers: Browser[] = [ { name: 'edge', family: 'chromium', - channel: 'canary', - displayName: 'Edge Canary', - versionRegex: /Microsoft Edge.+?(\S*(?= canary)|(?<=canary )\S*)/mi, - binary: ['edge-canary', 'microsoft-edge-canary'], + channel: 'beta', + displayName: 'Edge Beta', + versionRegex: /Microsoft Edge.+?(\S*(?= beta)|(?<=beta )\S*)/mi, + binary: ['edge-beta', 'microsoft-edge-beta'], minSupportedVersion: MIN_EDGE_VERSION, }, { name: 'edge', family: 'chromium', - channel: 'beta', - displayName: 'Edge Beta', - versionRegex: /Microsoft Edge.+?(\S*(?= beta)|(?<=beta )\S*)/mi, - binary: ['edge-beta', 'microsoft-edge-beta'], + channel: 'canary', + displayName: 'Edge Canary', + versionRegex: /Microsoft Edge.+?(\S*(?= canary)|(?<=canary )\S*)/mi, + binary: ['edge-canary', 'microsoft-edge-canary'], minSupportedVersion: MIN_EDGE_VERSION, }, { diff --git a/packages/launcher/lib/windows/index.ts b/packages/launcher/lib/windows/index.ts index a215fdfe65f5..50c18b382fb4 100644 --- a/packages/launcher/lib/windows/index.ts +++ b/packages/launcher/lib/windows/index.ts @@ -48,8 +48,8 @@ function formChromeCanaryAppPath () { function formChromeForTestingAppPath () { return [ - 'C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', 'C:/Program Files/Google/Chrome for Testing/chrome.exe', + 'C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', ].map(normalize) } diff --git a/packages/launcher/test/unit/darwin_spec.ts b/packages/launcher/test/unit/darwin_spec.ts index d62101d27b09..0e03b11904ab 100644 --- a/packages/launcher/test/unit/darwin_spec.ts +++ b/packages/launcher/test/unit/darwin_spec.ts @@ -30,7 +30,7 @@ function generatePlist (key, value) { function stubBrowser (findAppParams: darwinUtil.FindAppParams) { (utils.getOutput as unknown as SinonStub) - .withArgs(`mdfind 'kMDItemCFBundleIdentifier=="${findAppParams.appId}"' | head -1`) + .withArgs(`mdfind 'kMDItemCFBundleIdentifier=="${findAppParams.bundleId}"' | head -1`) .resolves({ stdout: `/Applications/${findAppParams.appName}` }) ;(fse.readFile as SinonStub) diff --git a/packages/launcher/test/unit/windows_spec.ts b/packages/launcher/test/unit/windows_spec.ts index 9566538e7af7..1d9eb80ff137 100644 --- a/packages/launcher/test/unit/windows_spec.ts +++ b/packages/launcher/test/unit/windows_spec.ts @@ -47,7 +47,7 @@ describe('windows browser detection', () => { stubBrowser('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', '1.2.3') // chromium stubBrowser('C:/Program Files (x86)/Google/chrome-win32/chrome.exe', '2.3.4') - // chrome-for-testing + // chrome-for-testing - 64-bit will be preferred stubBrowser('C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', '1.2.3') stubBrowser('C:/Program Files/Google/Chrome for Testing/chrome.exe', '1.2.3') @@ -77,23 +77,30 @@ describe('windows browser detection', () => { snapshot(await detect(knownBrowsers)) }) - it('detects 64-bit Chrome Beta app path', async () => { + it('detects Chrome Beta 64-bit install', async () => { stubBrowser('C:/Program Files/Google/Chrome Beta/Application/chrome.exe', '9.0.1') - const chrome = _.find(knownBrowsers, { name: 'chrome', channel: 'beta' }) + const chrome = _.find(knownBrowsers, { name: 'chrome', channel: 'beta' })! - snapshot(await windowsHelper.detect(chrome)) + snapshot(await detect([chrome])) }) // @see https://github.com/cypress-io/cypress/issues/8425 - it('detects new Chrome 64-bit app path', async () => { + it('detects Chrome 64-bit install', async () => { stubBrowser('C:/Program Files/Google/Chrome/Application/chrome.exe', '4.4.4') - const chrome = _.find(knownBrowsers, { name: 'chrome', channel: 'stable' }) + const chrome = _.find(knownBrowsers, { name: 'chrome', channel: 'stable' })! - snapshot(await windowsHelper.detect(chrome)) + snapshot(await detect([chrome])) + }) + + it('detects Chrome for Testing 32-bit install', async () => { + stubBrowser('C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', '5.5.5') + const chromeForTesting = _.find(knownBrowsers, { name: 'chrome-for-testing' })! + + snapshot(await detect([chromeForTesting])) }) // @see https://github.com/cypress-io/cypress/issues/8432 - it('detects local Firefox installs', async () => { + it('detects Firefox local installs', async () => { stubBrowser(`${HOMEDIR}/AppData/Local/Mozilla Firefox/firefox.exe`, '100') stubBrowser(`${HOMEDIR}/AppData/Local/Firefox Nightly/firefox.exe`, '200') stubBrowser(`${HOMEDIR}/AppData/Local/Firefox Developer Edition/firefox.exe`, '300') From 71576ecfb45cd7ae558e1e1114f30c25de141a41 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Thu, 12 Dec 2024 11:37:03 -0700 Subject: [PATCH 10/18] update display name --- packages/launcher/__snapshots__/browsers_spec.ts.js | 2 +- packages/launcher/__snapshots__/darwin_spec.ts.js | 2 +- packages/launcher/__snapshots__/windows_spec.ts.js | 4 ++-- packages/launcher/lib/darwin/index.ts | 12 ++++++------ packages/launcher/lib/known-browsers.ts | 2 +- packages/launcher/lib/windows/index.ts | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/launcher/__snapshots__/browsers_spec.ts.js b/packages/launcher/__snapshots__/browsers_spec.ts.js index b2b76862ca38..e14c627c0405 100644 --- a/packages/launcher/__snapshots__/browsers_spec.ts.js +++ b/packages/launcher/__snapshots__/browsers_spec.ts.js @@ -34,7 +34,7 @@ exports['browsers returns the expected list of browsers 1'] = [ 'name': 'chrome-for-testing', 'family': 'chromium', 'channel': 'stable', - 'displayName': 'Chrome Test', + 'displayName': 'Chrome for Testing', 'versionRegex': {}, 'binary': 'chrome', 'minSupportedVersion': 64, diff --git a/packages/launcher/__snapshots__/darwin_spec.ts.js b/packages/launcher/__snapshots__/darwin_spec.ts.js index 2ea43b69c8be..0111a4c6c728 100644 --- a/packages/launcher/__snapshots__/darwin_spec.ts.js +++ b/packages/launcher/__snapshots__/darwin_spec.ts.js @@ -58,7 +58,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'name': 'chrome-for-testing', 'family': 'chromium', 'channel': 'stable', - 'displayName': 'Chrome Test', + 'displayName': 'Chrome for Testing', 'versionRegex': {}, 'binary': 'chrome', 'minSupportedVersion': 64, diff --git a/packages/launcher/__snapshots__/windows_spec.ts.js b/packages/launcher/__snapshots__/windows_spec.ts.js index c081762a91d7..5870fa76f37b 100644 --- a/packages/launcher/__snapshots__/windows_spec.ts.js +++ b/packages/launcher/__snapshots__/windows_spec.ts.js @@ -58,7 +58,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'name': 'chrome-for-testing', 'family': 'chromium', 'channel': 'stable', - 'displayName': 'Chrome Test', + 'displayName': 'Chrome for Testing', 'versionRegex': {}, 'binary': 'chrome', 'minSupportedVersion': 64, @@ -279,7 +279,7 @@ exports['windows browser detection detects Chrome for Testing 32-bit install 1'] 'name': 'chrome-for-testing', 'family': 'chromium', 'channel': 'stable', - 'displayName': 'Chrome Test', + 'displayName': 'Chrome for Testing', 'versionRegex': {}, 'binary': 'chrome', 'minSupportedVersion': 64, diff --git a/packages/launcher/lib/darwin/index.ts b/packages/launcher/lib/darwin/index.ts index 5ce39651297a..8d4f7ee06c37 100644 --- a/packages/launcher/lib/darwin/index.ts +++ b/packages/launcher/lib/darwin/index.ts @@ -76,18 +76,18 @@ export const browsers: Detectors = { bundleId: 'com.microsoft.Edge', versionProperty: 'CFBundleShortVersionString', }, - canary: { - appName: 'Microsoft Edge Canary.app', - executable: 'Contents/MacOS/Microsoft Edge Canary', - bundleId: 'com.microsoft.Edge.Canary', - versionProperty: 'CFBundleShortVersionString', - }, beta: { appName: 'Microsoft Edge Beta.app', executable: 'Contents/MacOS/Microsoft Edge Beta', bundleId: 'com.microsoft.Edge.Beta', versionProperty: 'CFBundleShortVersionString', }, + canary: { + appName: 'Microsoft Edge Canary.app', + executable: 'Contents/MacOS/Microsoft Edge Canary', + bundleId: 'com.microsoft.Edge.Canary', + versionProperty: 'CFBundleShortVersionString', + }, dev: { appName: 'Microsoft Edge Dev.app', executable: 'Contents/MacOS/Microsoft Edge Dev', diff --git a/packages/launcher/lib/known-browsers.ts b/packages/launcher/lib/known-browsers.ts index 154301e31c58..24c335fe0169 100644 --- a/packages/launcher/lib/known-browsers.ts +++ b/packages/launcher/lib/known-browsers.ts @@ -60,7 +60,7 @@ export const knownBrowsers: Browser[] = [ name: 'chrome-for-testing', family: 'chromium', channel: 'stable', - displayName: 'Chrome Test', + displayName: 'Chrome for Testing', versionRegex: /Google Chrome for Testing (\S+)/m, binary: 'chrome', minSupportedVersion: MIN_CHROME_VERSION, diff --git a/packages/launcher/lib/windows/index.ts b/packages/launcher/lib/windows/index.ts index 50c18b382fb4..e3dcb5bc0dc7 100644 --- a/packages/launcher/lib/windows/index.ts +++ b/packages/launcher/lib/windows/index.ts @@ -116,10 +116,10 @@ const formPaths: WindowsBrowserPaths = { beta: () => { return [normalize('C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe')] }, + canary: formEdgeCanaryAppPath, dev: () => { return [normalize('C:/Program Files (x86)/Microsoft/Edge Dev/Application/msedge.exe')] }, - canary: formEdgeCanaryAppPath, }, } From 32adf6ec3b08b75ce4a7d3ece4015ca91b3061d6 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Thu, 12 Dec 2024 11:41:02 -0700 Subject: [PATCH 11/18] update logo --- packages/frontend-shared/src/assets/browserLogos.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend-shared/src/assets/browserLogos.ts b/packages/frontend-shared/src/assets/browserLogos.ts index 49e3e477dbe0..272b5cb5aece 100644 --- a/packages/frontend-shared/src/assets/browserLogos.ts +++ b/packages/frontend-shared/src/assets/browserLogos.ts @@ -19,7 +19,7 @@ export const allBrowsersIcons = { 'Chrome': chromeIcon, 'Chrome Beta': chromeBetaIcon, 'Chrome Canary': canaryIcon, - 'Chrome Test': chromeTestIcon, + 'Chrome for Testing': chromeTestIcon, 'Firefox': firefoxIcon, 'Edge': edgeIcon, 'Chromium': chromiumIcon, From 9717c2f2044f10188cbda462ec60e85ddca6492c Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Thu, 12 Dec 2024 13:29:16 -0700 Subject: [PATCH 12/18] icon update --- packages/app/src/debug/LayeredBrowserIcons.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/app/src/debug/LayeredBrowserIcons.vue b/packages/app/src/debug/LayeredBrowserIcons.vue index 07bb58c767da..0a5b488d2d5b 100644 --- a/packages/app/src/debug/LayeredBrowserIcons.vue +++ b/packages/app/src/debug/LayeredBrowserIcons.vue @@ -33,7 +33,7 @@ import { IconBrowserChrome, // Note: These browser names should map to the list of logoPaths found at https://github.com/cypress-io/cypress-services/blob/46073cb5c387af3b203404280a1664a85e233b93/packages/common/src/logos/getLogoPath.ts // Some of these are currently incorrect (ex: CHROME-CANARY). // We are also missing browsers from the list as well -export type BrowserType = 'CHROME' | 'SAFARI' | 'FIREFOX' | 'CHROME-CANARY' | 'CHROME BETA' | 'EDGE' | 'WEBKIT' | 'ELECTRON' +export type BrowserType = 'CHROME' | 'CHROME BETA' | 'CANARY' | 'CHROME CANARY' | 'CHROME-FOR-TESTING' | 'CUSTOM-CHROME-FOR-TESTING' | 'SAFARI' | 'FIREFOX' | 'EDGE' | 'WEBKIT' | 'ELECTRON' interface LayeredProps { browsers: BrowserType[] @@ -57,7 +57,10 @@ const results = computed(() => { const BROWSER_MAP: Record = { 'CHROME': IconBrowserChrome, 'CHROME BETA': IconBrowserChromeBeta, - 'CHROME-CANARY': IconBrowserChromeCanary, + 'CANARY': IconBrowserChromeCanary, + 'CHROME CANARY': IconBrowserChromeCanary, + 'CHROME FOR TESTING': IconBrowserChrome, + 'CUSTOM CHROME FOR TESTING': IconBrowserChrome, 'SAFARI': IconBrowserSafari, 'FIREFOX': IconBrowserMozillaFirefox, 'EDGE': IconBrowserEdge, From e53f9d7c14745c1c4ad75840ac314395833ab24e Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Thu, 12 Dec 2024 14:45:46 -0700 Subject: [PATCH 13/18] update browser icons on debug page --- .../app/src/debug/LayeredBrowserIcons.vue | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/app/src/debug/LayeredBrowserIcons.vue b/packages/app/src/debug/LayeredBrowserIcons.vue index 0a5b488d2d5b..58accb6af815 100644 --- a/packages/app/src/debug/LayeredBrowserIcons.vue +++ b/packages/app/src/debug/LayeredBrowserIcons.vue @@ -20,20 +20,19 @@ From 4fe89bcbe208d03771c8b4947a5404bd7452fdd3 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Thu, 12 Dec 2024 15:47:28 -0700 Subject: [PATCH 14/18] fixing tests --- packages/app/src/debug/LayeredBrowserIcons.cy.tsx | 8 ++++---- .../BROWSER_NOT_FOUND_BY_NAME - canary.html | 2 +- .../__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/app/src/debug/LayeredBrowserIcons.cy.tsx b/packages/app/src/debug/LayeredBrowserIcons.cy.tsx index 2de78fafab04..410812b46532 100644 --- a/packages/app/src/debug/LayeredBrowserIcons.cy.tsx +++ b/packages/app/src/debug/LayeredBrowserIcons.cy.tsx @@ -2,7 +2,7 @@ import LayeredBrowserIcons from './LayeredBrowserIcons.vue' import type { BrowserType } from './LayeredBrowserIcons.vue' describe('', () => { - const browsers: BrowserType[] = ['CHROME', 'CHROME-CANARY', 'CHROME BETA', 'FIREFOX', 'WEBKIT', 'EDGE', 'ELECTRON'] + const browsers: BrowserType[] = ['CHROME', 'CHROME BETA', 'CANARY', 'CHROME CANARY', 'CHROME FOR TESTING', 'CUSTOM CHROME FOR TESTING', 'CHROMIUM', 'CUSTOM CHROMIUM', 'EDGE', 'EDGE BETA', 'EDGE CANARY', 'EDGE DEV', 'ELECTRON', 'FIREFOX', 'FIREFOX DEVELOPER EDITION', 'FIREFOX NIGHTLY', 'WEBKIT'] it('mounts correctly for single browser', () => { browsers.forEach((ele) => { @@ -21,11 +21,11 @@ describe('', () => {
- + - + - +
)) diff --git a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html index e28e040ca041..f3176b9f8ef1 100644 --- a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html +++ b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html @@ -58,8 +58,8 @@ - firefox:dev - firefox:nightly - edge - - edge:canary - edge:beta + - edge:canary - edge:dev Note: In Cypress version 4.0.0, Canary must be launched as chrome:canary, not canary. diff --git a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html index c8ab0a7a8b96..2ee1cd1ce62c 100644 --- a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html +++ b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html @@ -58,7 +58,7 @@ - firefox:dev - firefox:nightly - edge - - edge:canary - edge:beta + - edge:canary - edge:dev \ No newline at end of file From 9edb031a6ab8ec25765b41190f71a11a9ed6580f Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Thu, 12 Dec 2024 16:10:10 -0700 Subject: [PATCH 15/18] fix ts error --- packages/app/src/debug/LayeredBrowserIcons.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/app/src/debug/LayeredBrowserIcons.vue b/packages/app/src/debug/LayeredBrowserIcons.vue index 58accb6af815..4cb4032cd3b1 100644 --- a/packages/app/src/debug/LayeredBrowserIcons.vue +++ b/packages/app/src/debug/LayeredBrowserIcons.vue @@ -61,6 +61,8 @@ const BROWSER_MAP: Record = { 'CHROME CANARY': IconBrowserChromeCanary, 'CHROME FOR TESTING': IconBrowserChrome, 'CUSTOM CHROME FOR TESTING': IconBrowserChrome, + 'CHROMIUM': IconGeneralGlobe, + 'CUSTOM CHROMIUM': IconGeneralGlobe, 'EDGE': IconBrowserEdge, 'EDGE BETA': IconBrowserEdge, 'EDGE CANARY': IconBrowserEdge, From acf54b23f888e90ee0ae45702205265204a3a72a Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Thu, 12 Dec 2024 19:54:31 -0700 Subject: [PATCH 16/18] update changelog --- cli/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 604d62a36988..a84d86167676 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -5,7 +5,7 @@ _Released 12/17/2024 (PENDING)_ **Features:** -- Added official support for Google Chrome for Testing browser. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554). +- Added official support for the [Google Chrome for Testing](https://github.com/GoogleChromeLabs/chrome-for-testing) browser. Assuming the browser is in a location where it can be [auto-detected](https://on.cypress.io/troubleshooting-launching-browsers), it can be launched by providing the `--browser chrome-for-testing` option. If it can't be auto-detected, the path to the browser can also be provided. Previously [customizing the available browsers](https://on.cypress.io/customize-browsers) was required. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554). **Bugfixes:** From bafd7578f463e4ed3ca3f939da412fa318b689e8 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Fri, 13 Dec 2024 13:33:31 -0700 Subject: [PATCH 17/18] adding additional window chromium paths --- .../launcher/__snapshots__/windows_spec.ts.js | 69 +++++++++++++++++++ packages/launcher/lib/windows/index.ts | 9 ++- packages/launcher/test/unit/windows_spec.ts | 25 ++++++- 3 files changed, 99 insertions(+), 4 deletions(-) diff --git a/packages/launcher/__snapshots__/windows_spec.ts.js b/packages/launcher/__snapshots__/windows_spec.ts.js index 5870fa76f37b..8652d47e2492 100644 --- a/packages/launcher/__snapshots__/windows_spec.ts.js +++ b/packages/launcher/__snapshots__/windows_spec.ts.js @@ -353,3 +353,72 @@ exports['windows browser detection detects Firefox local installs 1'] = [ }, }, ] + +exports['windows browser detection detects Chromium 64-bit install 1'] = [ + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files/Google/chrome-win/chrome.exe', + 'version': '6.6.6', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, +] + +exports['windows browser detection detects Chromium 32-bit install in Chromium folder 1'] = [ + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files (x86)/Google/Chromium/chrome.exe', + 'version': '7.7.7', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, +] + +exports['windows browser detection detects Chromium 64-bit install in Chromium folder 1'] = [ + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files/Google/Chromium/chrome.exe', + 'version': '8.8.8', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, +] diff --git a/packages/launcher/lib/windows/index.ts b/packages/launcher/lib/windows/index.ts index e3dcb5bc0dc7..c1897b674200 100644 --- a/packages/launcher/lib/windows/index.ts +++ b/packages/launcher/lib/windows/index.ts @@ -26,9 +26,12 @@ function formChromeBetaAppPath () { } function formChromiumAppPath () { - const exe = 'C:/Program Files (x86)/Google/chrome-win32/chrome.exe' - - return [normalize(exe)] + return [ + 'C:/Program Files (x86)/Google/chrome-win32/chrome.exe', + 'C:/Program Files/Google/chrome-win/chrome.exe', + 'C:/Program Files/Google/Chromium/chrome.exe', + 'C:/Program Files (x86)/Google/Chromium/chrome.exe', + ].map(normalize) } function formChromeCanaryAppPath () { diff --git a/packages/launcher/test/unit/windows_spec.ts b/packages/launcher/test/unit/windows_spec.ts index 1d9eb80ff137..af321beca64a 100644 --- a/packages/launcher/test/unit/windows_spec.ts +++ b/packages/launcher/test/unit/windows_spec.ts @@ -45,8 +45,10 @@ describe('windows browser detection', () => { it('detects browsers as expected', async () => { // chrome stubBrowser('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', '1.2.3') - // chromium + // chromium - 32-bit will be preferred for passivity stubBrowser('C:/Program Files (x86)/Google/chrome-win32/chrome.exe', '2.3.4') + stubBrowser('C:/Program Files/Google/chrome-win/chrome.exe', '2.3.4') + // chrome-for-testing - 64-bit will be preferred stubBrowser('C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', '1.2.3') stubBrowser('C:/Program Files/Google/Chrome for Testing/chrome.exe', '1.2.3') @@ -110,6 +112,27 @@ describe('windows browser detection', () => { snapshot(await detect(firefoxes)) }) + it('detects Chromium 64-bit install', async () => { + stubBrowser('C:/Program Files/Google/chrome-win/chrome.exe', '6.6.6') + const chromium = _.find(knownBrowsers, { name: 'chromium' })! + + snapshot(await detect([chromium])) + }) + + it('detects Chromium 32-bit install in Chromium folder', async () => { + stubBrowser('C:/Program Files (x86)/Google/Chromium/chrome.exe', '7.7.7') + const chromium = _.find(knownBrowsers, { name: 'chromium' })! + + snapshot(await detect([chromium])) + }) + + it('detects Chromium 64-bit install in Chromium folder', async () => { + stubBrowser('C:/Program Files/Google/Chromium/chrome.exe', '8.8.8') + const chromium = _.find(knownBrowsers, { name: 'chromium' })! + + snapshot(await detect([chromium])) + }) + it('works with :browserName format in Windows', () => { sinon.stub(os, 'platform').returns('win32') let path = `${HOMEDIR}/foo/bar/browser.exe` From 5d87c4bd1a33e5a333ed20845150fd46471c7d21 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Fri, 13 Dec 2024 15:03:17 -0700 Subject: [PATCH 18/18] updating svg --- .../src/assets/browserLogos.ts | 2 +- .../logos/browser-chrome-for-testing_x16.svg | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg diff --git a/packages/frontend-shared/src/assets/browserLogos.ts b/packages/frontend-shared/src/assets/browserLogos.ts index 272b5cb5aece..fb1317acd30e 100644 --- a/packages/frontend-shared/src/assets/browserLogos.ts +++ b/packages/frontend-shared/src/assets/browserLogos.ts @@ -4,7 +4,7 @@ import edgeIcon from 'browser-logos/src/edge/edge.svg?url' import electronIcon from 'browser-logos/src/electron/electron.svg?url' import canaryIcon from 'browser-logos/src/chrome-canary/chrome-canary.svg?url' import chromeBetaIcon from 'browser-logos/src/chrome-beta/chrome-beta.svg?url' -import chromeTestIcon from 'browser-logos/src/chrome-test/chrome-test.svg?url' +import chromeTestIcon from '@packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg?url' import chromiumIcon from 'browser-logos/src/chromium/chromium.svg?url' import edgeBetaIcon from 'browser-logos/src/edge-beta/edge-beta.png' import edgeCanaryIcon from 'browser-logos/src/edge-canary/edge-canary.png' diff --git a/packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg b/packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg new file mode 100644 index 000000000000..0426ce0ae6e0 --- /dev/null +++ b/packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + +