fix(browserstack-service): omit unset accessibility config#15215
Merged
wswebcreation merged 1 commit intoMay 17, 2026
Merged
Conversation
xxshubhamxx
approved these changes
May 6, 2026
Contributor
|
@christian-bromann Could you review and merge this PR? |
wswebcreation
approved these changes
May 17, 2026
Contributor
|
Hey @kbrooks (and @wswebcreation), if I'm not mistaken, this PR is breaking |
Contributor
Author
|
Yeah it got merged with a failing check somehow so it's probably broken |
13 tasks
Contributor
Author
|
@dprevost-LMI I have a fix here #15262 |
dprevost-LMI
pushed a commit
that referenced
this pull request
May 24, 2026
* fix(browserstack-service): restore boolean product map types after #15215 PR #15215 loosened getProductMap's return to `{ [key: string]: boolean | undefined }`, which broke the public `Capabilities.buildProductMap` and `EventProperties.productMap` contracts (both `{ [key: string]: boolean }`). It also left launchTestSession declaring `accessibilityAutomation: boolean | null` while the launcher now passes `boolean | undefined`, producing 9 TS errors during `npm run setup`. Coerce `config.accessibility` (`boolean | undefined`) to `boolean` via `=== true` in getProductMap, and align launchTestSession's parameter to `?: boolean`. Preserves the PR's "omit unset accessibility" intent for the build-start payload without leaking `undefined`/`null` into typed boolean capabilities. * test(browserstack-service): cover getProductMap undefined-accessibility branch * test(browserstack-service): cover getProductMap accessibility: true case --------- Co-authored-by: Kyle Brooks <1072367+kbrooks@users.noreply.github.com>
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.
Summary
accessibility: nullthrough BrowserStack service config and product-map metadataProblem
In WDIO v9 BrowserStack service flows, sessions can fail before creation with an error like:
We traced this to
wdio-browserstack-servicecarrying accessibility state asboolean | nulland then serializing that unset state into BrowserStack CLI/session config asaccessibility: null.The failure was reproducible in BrowserStack-backed Selenium preprod runs even when the user config did not set any accessibility option.
Root cause
The regression appears to come from the v9 accessibility auto-enable path introduced in a0bc710 (
Auto enable accessibility [v9]).That change introduced nullable accessibility state and propagated it through:
BrowserStackConfig.accessibility_accessibilityAutomationUsing
undefinedfor the unset case is safer here because it omits the field instead of sendingnullto BrowserStack.Fix
boolean | nullaccessibility: falseoption fromDEFAULT_OPTIONSundefinedwhen accessibility is not configured