From 2abfca4af87352638c02c70db2d68d1b1bdfc638 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Wed, 11 Dec 2024 09:10:17 -0700 Subject: [PATCH] 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==