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
Conversation
Can we raise the same PR to the diff --git a/packages/wdio-utils/tests/node/utils.test.ts b/packages/wdio-utils/tests/node/utils.test.ts
index 2e7e8e0c9..7020a8f1b 100644
--- a/packages/wdio-utils/tests/node/utils.test.ts
+++ b/packages/wdio-utils/tests/node/utils.test.ts
@@ -140,11 +140,11 @@ describe('driver utils', () => {
it('should install chrome stable if browser is not found', async () => {
vi.mocked(detectBrowserPlatform).mockReturnValueOnce('windows' as any)
vi.mocked(locateChrome).mockResolvedValue('/path/to/stable')
- await expect(setupPuppeteerBrowser('/foo/bar', {})).resolves.toEqual( {
+ await expect(setupPuppeteerBrowser('/foo/bar', {})).resolves.toEqual({
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')
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@step21 can you check the failing test?
For the failing test, most obvious to me seems that when |
@step21 it is likely that we don't clear the mock beforehand. |
Closing as this hand landed as part of #12720 |
Proposed changes
//: # Ideally this allows tests with Firefox to work offline and not call googlechromelabs.github.io (and thus fail). As discussed in #12705
Types of changes
Checklist
Backport Request
//: # (The current
main
branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against thev8
branch.)v9
and doesn't need to be back-ported#12718
Further comments
//: # Right now at least locally there was one test failure, but I am not sure how bad this is or how to solve it. So I wanted to get started on the PR anyway for now. It seems the test expect a Windows version, maybe it failed for me on macOS because of that?
Reviewers: @webdriverio/project-committers