Migrate browser test runner from karma to webdriverio#4183
Open
MichaelAJay wants to merge 8 commits into
Open
Conversation
…e-browser-tests
…e-browser-tests
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates browser/unit test execution for selected packages from Karma to WebdriverIO by explicitly selecting the WDIO browser runner in their gulp tasks, and updates the shared WDIO configuration to better match how tests are generated/executed in this monorepo.
Changes:
- Switch browser test runner selection to
webdriverioforbitcore-lib(and derivatives) plusbitcore-mnemonicviastartGulp(..., { browserRunner: 'webdriverio' }). - Update
@bitpay-labs/bitcore-build’swdio.conf.jsto resolve the generatedtests.jsfrom the consuming package’s CWD. - Adjust WDIO runtime settings (Chrome args/capabilities) and increase Mocha timeout from 60s to 240s.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/bitcore-mnemonic/gulpfile.js | Explicitly selects WebdriverIO as the browser runner for mnemonic package browser tests. |
| packages/bitcore-lib/gulpfile.js | Explicitly selects WebdriverIO as the browser runner for bitcore-lib browser tests. |
| packages/bitcore-lib-ltc/gulpfile.js | Explicitly selects WebdriverIO as the browser runner for LTC lib browser tests. |
| packages/bitcore-lib-doge/gulpfile.js | Explicitly selects WebdriverIO as the browser runner for DOGE lib browser tests. |
| packages/bitcore-lib-cash/gulpfile.js | Explicitly selects WebdriverIO as the browser runner for BCH lib browser tests. |
| packages/bitcore-build/wdio.conf.js | Updates WDIO configuration to find generated tests.js in CWD, adjusts Chrome capabilities, and increases Mocha timeout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+9
to
+12
| const cwdTests = path.join(process.cwd(), 'tests.js'); | ||
| if (fs.existsSync(cwdTests)) return [cwdTests]; | ||
| console.error('[wdio] tests.js not found. Tried: ' + cwdTests); | ||
| return [cwdTests]; |
| '--disable-web-security', | ||
| '--no-sandbox', | ||
| '--disable-dev-shm-usage', | ||
| '--user-data-dir=/tmp/chrome-test-profile' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update packages which do not call startGulp with
skipBrowser: trueoption to use webdriverio for browser testing instead of karma. Updated wdio conf with test filepath resolver & bumped mocha timeout.Changelog
'wdio:enforceWebDriverClassic': truemitigates a test runner error in which the test runner tries to connect to a BiDi serverTesting Notes
Ensure CI tests execute successfully for the following packages:
Review the CircleCI test output for successfully run tests. Hunt the area at the top of the section with lines
[chrome 148...]or Find/Search for "wdio/browser-runner".Checklist