Skip to content

Conversation

@manoj-k04
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a 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 webdriverio from 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 on detectedBrowserAutomationFramework === "webdriverio".
  • Updates the user-facing RCA guidance text to explicitly mention using the RCA tool.
  • Bumps the MCP server version to 1.2.11 in package.json, package-lock.json, and server.json.

Notes on behavior:

  • With webdriverio removed from SDKSupportedTestingFrameworkEnum but still used as a testing-framework key in percy-automate/frameworks.ts and percy-bstack/frameworks.ts, Percy Automate and Percy+BrowserStack WDIO configurations will now be reported as unsupported via checkPercyIntegrationSupport and getPercyInstructions unless those maps are updated to treat WebdriverIO as a browser automation framework (with testing frameworks like mocha/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, SDKSupportedTestingFrameworkEnum no longer includes webdriverio, but checkPercyIntegrationSupport for Percy Automate still relies on SDKSupportedTestingFrameworkEnum values when calling isPercyAutomateFrameworkSupported, while src/tools/sdk-utils/percy-automate/frameworks.ts still defines WebdriverIO support under the selenium driver with webdriverio as the testing framework key. Similarly, Percy+BrowserStack uses getPercyInstructions backed by PERCY_INSTRUCTIONS in src/tools/sdk-utils/percy-bstack/frameworks.ts, which currently defines WebdriverIO under selenium with webdriverio as the testing framework key; with WebdriverIO now only present in SDKSupportedBrowserAutomationFrameworkEnum, Percy instructions for WebdriverIO via the MCP schemas can no longer be resolved. To avoid regressions and to make the MCP schemas consistent, either keep webdriverio available 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 like mocha/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.

@gaurav-singh-9227 gaurav-singh-9227 merged commit 4c290be into browserstack:main Jan 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants