-
Notifications
You must be signed in to change notification settings - Fork 34
Fix: WDIO integration using MCP #219
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: WDIO integration using MCP #219
Conversation
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.
Pull request overview
This PR aims to fix WebdriverIO (WDIO) integration in the BrowserStack MCP server by aligning framework enums, configuration maps, and handlers, and bumping the package version.
Changes:
- Reclassifies
webdriveriofrom a testing framework to a browser automation framework in shared types and BrowserStack SDK configuration (SUPPORTED_CONFIGURATIONS), and updates both BrowserStack-only and Percy+BrowserStack handlers to branch ondetectedBrowserAutomationFramework === "webdriverio". - Updates the user-facing RCA guidance text to explicitly mention using the RCA tool.
- Bumps the MCP server version to
1.2.11inpackage.json,package-lock.json, andserver.json.
Notes on behavior:
- With
webdriverioremoved fromSDKSupportedTestingFrameworkEnumbut still used as a testing-framework key inpercy-automate/frameworks.tsandpercy-bstack/frameworks.ts, Percy Automate and Percy+BrowserStack WDIO configurations will now be reported as unsupported viacheckPercyIntegrationSupportandgetPercyInstructionsunless those maps are updated to treat WebdriverIO as a browser automation framework (with testing frameworks likemocha/cucumber).
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/tools/sdk-utils/percy-bstack/handler.ts |
Switches WDIO special-casing to use detectedBrowserAutomationFramework === "webdriverio" so Percy+BrowserStack uses the correct SDK configuration path. |
src/tools/sdk-utils/common/utils.ts |
Tweaks the critical RCA follow-up message to explicitly mention using the RCA tool in non–Percy Web runs. |
src/tools/sdk-utils/common/types.ts |
Adds webdriverio to SDKSupportedBrowserAutomationFrameworkEnum, removes it from SDKSupportedTestingFrameworkEnum, and keeps ConfigMapping typings in sync—this is the source of the WDIO reclassification. |
src/tools/sdk-utils/bstack/sdkHandler.ts |
Aligns BrowserStack SDK-only flow so WDIO is handled as a browser automation framework (special-cased along with Cypress). |
src/tools/sdk-utils/bstack/frameworks.ts |
Updates SUPPORTED_CONFIGURATIONS so Node.js WDIO instructions live under webdriverio (automation framework) with mocha/cucumber testing frameworks. |
src/tools/sdk-utils/bstack/constants.ts |
Mirrors the WDIO move in the lower-level SUPPORTED_CONFIGURATIONS, assigning webdriverioInstructions under the webdriverio automation framework. |
server.json |
Updates the registered MCP server version to 1.2.11. |
package.json |
Bumps package version to 1.2.11 to reflect the WDIO integration changes. |
package-lock.json |
Syncs lockfile metadata with the new 1.2.11 package version. |
Comments suppressed due to low confidence (1)
src/tools/sdk-utils/common/types.ts:45
- Changing WebdriverIO from a testing framework to a browser automation framework in these enums without updating all of the corresponding configuration maps appears to break existing Percy flows. In particular,
SDKSupportedTestingFrameworkEnumno longer includeswebdriverio, butcheckPercyIntegrationSupportfor Percy Automate still relies onSDKSupportedTestingFrameworkEnumvalues when callingisPercyAutomateFrameworkSupported, whilesrc/tools/sdk-utils/percy-automate/frameworks.tsstill defines WebdriverIO support under theseleniumdriver withwebdriverioas the testing framework key. Similarly, Percy+BrowserStack usesgetPercyInstructionsbacked byPERCY_INSTRUCTIONSinsrc/tools/sdk-utils/percy-bstack/frameworks.ts, which currently defines WebdriverIO underseleniumwithwebdriverioas the testing framework key; with WebdriverIO now only present inSDKSupportedBrowserAutomationFrameworkEnum, Percy instructions for WebdriverIO via the MCP schemas can no longer be resolved. To avoid regressions and to make the MCP schemas consistent, either keepwebdriverioavailable in the testing enum, or (preferably) update the Percy Automate and Percy+BrowserStack configuration maps so that WebdriverIO is modeled as a browser automation framework (with appropriate testing frameworks likemocha/cucumber) in line with these enum changes.
export enum SDKSupportedBrowserAutomationFrameworkEnum {
playwright = "playwright",
selenium = "selenium",
cypress = "cypress",
webdriverio = "webdriverio",
}
export type SDKSupportedBrowserAutomationFramework =
keyof typeof SDKSupportedBrowserAutomationFrameworkEnum;
export enum SDKSupportedTestingFrameworkEnum {
jest = "jest",
codeceptjs = "codeceptjs",
playwright = "playwright",
pytest = "pytest",
robot = "robot",
behave = "behave",
cucumber = "cucumber",
nightwatch = "nightwatch",
mocha = "mocha",
junit4 = "junit4",
junit5 = "junit5",
testng = "testng",
cypress = "cypress",
nunit = "nunit",
mstest = "mstest",
xunit = "xunit",
specflow = "specflow",
reqnroll = "reqnroll",
rspec = "rspec",
serenity = "serenity",
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
No description provided.