Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(launcher): detect new Chrome 64-bit path on Windows #8449

Merged
merged 1 commit into from Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/launcher/__snapshots__/windows_spec.ts.js
Expand Up @@ -176,3 +176,9 @@ exports['windows browser detection detects browsers as expected 1'] = [
}
}
]

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"
}
7 changes: 4 additions & 3 deletions packages/launcher/lib/windows/index.ts
Expand Up @@ -9,9 +9,10 @@ import { Browser, FoundBrowser } from '../types'
import { utils } from '../utils'

function formFullAppPath (name: string) {
const prefix = 'C:/Program Files (x86)/Google/Chrome/Application'

return [normalize(join(prefix, `${name}.exe`))]
return [
`C:/Program Files (x86)/Google/Chrome/Application/${name}.exe`,
`C:/Program Files/Google/Chrome/Application/${name}.exe`,
].map(normalize)
}

function formChromiumAppPath () {
Expand Down
8 changes: 8 additions & 0 deletions packages/launcher/test/unit/windows_spec.ts
Expand Up @@ -65,6 +65,14 @@ describe('windows browser detection', () => {
snapshot(detected)
})

// @see https://github.com/cypress-io/cypress/issues/8425
it('detects new Chrome 64-bit app path', async () => {
stubBrowser('C:/Program Files/Google/Chrome/Application/chrome.exe', '4.4.4')
const chrome = _.find(browsers, { name: 'chrome', channel: 'stable' })

snapshot(await windowsHelper.detect(chrome))
})

context('#getVersionString', () => {
it('runs wmic and returns output', async () => {
stubBrowser('foo', 'bar')
Expand Down