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

Avoid calling googlechromelabs.github.io when offline + ffx #12709

Closed
wants to merge 3 commits into from
Closed
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: 3 additions & 3 deletions packages/wdio-utils/src/node/utils.ts
Expand Up @@ -190,16 +190,16 @@ export async function setupPuppeteerBrowser(cacheDir: string, caps: WebdriverIO.
linuxWhich: 'chromium-browser'
}).catch(() => undefined)
: await locateFirefox().catch(() => undefined)
const tag = isChromeOrChromium
const browserVersion = isChromeOrChromium
? getBuildIdByChromePath(executablePath)
: await getBuildIdByFirefoxPath(executablePath)
/**
* verify that we have a valid Chrome/Firefox browser installed
*/
if (tag) {
if (browserVersion) {
return {
executablePath,
browserVersion: await resolveBuildId(browserName, platform, tag)
browserVersion
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/wdio-utils/tests/node/utils.test.ts
Expand Up @@ -144,8 +144,8 @@
browserVersion: '116.0.5845.110',
executablePath: '/path/to/stable'
})
expect(resolveBuildId).toBeCalledTimes(1)
expect(resolveBuildId).toBeCalledTimes(0)
expect(resolveBuildId).toBeCalledWith('chrome', 'windows', '116.0.5845.110')

Check failure on line 148 in packages/wdio-utils/tests/node/utils.test.ts

View workflow job for this annotation

GitHub Actions / e2e-windows

packages/wdio-utils/tests/node/utils.test.ts > driver utils > setupPuppeteerBrowser > should install chrome stable if browser is not found

AssertionError: expected "spy" to be called with arguments: [ 'chrome', 'windows', …(1) ] Received: Number of calls: 0 ❯ packages/wdio-utils/tests/node/utils.test.ts:148:36

Check failure on line 148 in packages/wdio-utils/tests/node/utils.test.ts

View workflow job for this annotation

GitHub Actions / linux (18.x)

packages/wdio-utils/tests/node/utils.test.ts > driver utils > setupPuppeteerBrowser > should install chrome stable if browser is not found

AssertionError: expected "spy" to be called with arguments: [ 'chrome', 'windows', …(1) ] Received: Number of calls: 0 ❯ packages/wdio-utils/tests/node/utils.test.ts:148:36

Check failure on line 148 in packages/wdio-utils/tests/node/utils.test.ts

View workflow job for this annotation

GitHub Actions / linux (20.x)

packages/wdio-utils/tests/node/utils.test.ts > driver utils > setupPuppeteerBrowser > should install chrome stable if browser is not found

AssertionError: expected "spy" to be called with arguments: [ 'chrome', 'windows', …(1) ] Received: Number of calls: 0 ❯ packages/wdio-utils/tests/node/utils.test.ts:148:36

Check failure on line 148 in packages/wdio-utils/tests/node/utils.test.ts

View workflow job for this annotation

GitHub Actions / linux (21.x)

packages/wdio-utils/tests/node/utils.test.ts > driver utils > setupPuppeteerBrowser > should install chrome stable if browser is not found

AssertionError: expected "spy" to be called with arguments: [ 'chrome', 'windows', …(1) ] Received: Number of calls: 0 ❯ packages/wdio-utils/tests/node/utils.test.ts:148:36
})

it('should look for Chromium browser if defined as browser name', async () => {
Expand Down