fix(util): recognize *.bsstag.com hosts as BrowserStack (internal staging)#56
Open
AakashHotchandani wants to merge 1 commit into
Open
fix(util): recognize *.bsstag.com hosts as BrowserStack (internal staging)#56AakashHotchandani wants to merge 1 commit into
AakashHotchandani wants to merge 1 commit into
Conversation
…ging) getCloudProvider() and isBrowserstackInfra() only matched *.browserstack.com, so a session run against an internal staging hub (e.g. hub-<env>.bsstag.com, used by the SDK's BROWSERSTACK_STAGING_ENV config-server override) was treated as a non-BrowserStack grid — which disables the accessibility scan, session status/naming, and app-automate handling. Recognize .bsstag.com hosts too, in both host checks. Mirrors browserstack-javaagent PR #2010's isBrowserstackHubUrl fix. Validated: full green wdio App-Automate run against a staging env with the App A11y hook-scan executing and results polled from the staging app-accessibility host. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
What
getCloudProvider()andisBrowserstackInfra()inutil.tsonly recognize*.browserstack.comhosts. When a run targets an internal staging hub — e.g.hub-<env>.bsstag.com, which the SDK produces via theBROWSERSTACK_STAGING_ENVconfig-server override — those checks returnunknown_grid/false, so the service treats the session as a non-BrowserStack grid. That disables:isBrowserstackSession()→ false)Change
Recognize
.bsstag.comin both host checks (2 sites ingetCloudProvider, 1 inisBrowserstackInfra). This is the wdio-service analog ofbrowserstack-javaagentPR #2010'sisBrowserstackHubUrlfix (which added.bsstag.comto the hub regex)..bsstag.comis BrowserStack's own staging domain, so this only broadens recognition to internal staging hosts; prod behavior is unchanged.Validation
Full green wdio App-Automate run against a staging env (
rengg-stag-app-a11y): 2 tests passed, the App A11y hook-scan executed (accessibilityScanStarted: true), and a11y results were polled from the stagingapp-accessibility-<env>.bsstag.comhost. Related: browserstack-binary PR #1550 (the SDK-sideBROWSERSTACK_STAGING_ENVoverride).🤖 Generated with Claude Code