Skip to content

Commit fe6aab8

Browse files
authored
fix(e2e): use chrome stable instead of canary for web tests COMPASS-10009 COMPASS-10010 COMPASS-10012 (#7528)
chore(e2e): use chrome stable instead of canary for web tests
1 parent 3b82613 commit fe6aab8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

packages/compass-e2e-tests/helpers/test-runner-context.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,23 +140,13 @@ function buildWebArgs(yargs: Argv) {
140140
default: 'chrome',
141141
})
142142
// https://webdriver.io/docs/driverbinaries/
143-
//
144-
// If you leave out browserVersion it will try and find the browser binary
145-
// on your system. If you specify it it will download that version. The
146-
// main limitation then is that 'latest' is the only 'semantic' version
147-
// that is supported for Firefox.
148-
// https://github.com/puppeteer/puppeteer/blob/ab5d4ac60200d1cea5bcd4910f9ccb323128e79a/packages/browsers/src/browser-data/browser-data.ts#L66
149-
//
150-
// Alternatively we can download it ourselves and specify the path to the
151-
// binary or we can even start and stop chromedriver/geckodriver manually.
152-
//
153-
// NOTE: The version of chromedriver or geckodriver in play might also be
154-
// relevant.
155143
.option('browser-version', {
156144
type: 'string',
157145
description:
158-
'Test runner browser version (`unset` will not provide an explicit version to webdriver)',
159-
default: 'latest',
146+
'Test runner browser version (`--no-browser-version` will not provide an explicit version to webdriver)',
147+
// We're not defaulting browserVersion to anything in yargs config so
148+
// that the value can be derived based on the browserName later
149+
default: undefined,
160150
})
161151
.option('sandbox-url', {
162152
type: 'string',
@@ -279,6 +269,16 @@ if ('then' in parsedArgs && typeof parsedArgs.then === 'function') {
279269
export const context = parsedArgs as CommonParsedArgs &
280270
Partial<DesktopParsedArgs & WebParsedArgs>;
281271

272+
if (context.browserVersion === undefined) {
273+
context.browserVersion = context['browser-version'] =
274+
// If you leave out `browserVersion` it will try and find the browser binary
275+
// on your system. If you specify it it will download that version. The main
276+
// limitation then is that 'latest' is the only 'semantic' version that is
277+
// supported for Firefox.
278+
// https://github.com/puppeteer/puppeteer/blob/ab5d4ac60200d1cea5bcd4910f9ccb323128e79a/packages/browsers/src/browser-data/browser-data.ts#L66
279+
context.browserName === 'firefox' ? 'latest' : 'stable';
280+
}
281+
282282
export function isTestingDesktop(ctx = context): ctx is DesktopParsedArgs {
283283
return testEnv === 'desktop';
284284
}

0 commit comments

Comments
 (0)