feat(v8): add skipAppOverride service option#50
Open
Bhargavi-BS wants to merge 1 commit into
Open
Conversation
Port of webdriverio/webdriverio#15374 (v8 backport of #15373) to the standalone repo. With skipAppOverride: true the service classifies the session as App Automate even when no app option is set, skips the app upload, and does not inject an appium:app capability — the user supplies the app reference themselves. Conflicting app option is warned about and ignored; skipAppOverride: false with no app fails fast before any session starts. The option is stripped from bstack:options and never forwarded to the hub. Co-Authored-By: Claude Fable 5 <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.
Port of webdriverio/webdriverio#15374 (the v8 backport of webdriverio/webdriverio#15373) to the standalone repo, targeting the
v8branch.What this adds
A
skipAppOverrideservice option for App Automate (Appium) runs — same feature as themainport, #49.With
skipAppOverride: true, the service:appoption is set.appium:appcapability — the user supplies the app reference themselves (pre-uploadedbs://hash as a driver capability, orBROWSERSTACK_APP_ID).Edge cases:
skipAppOverride: truewith anappoption → conflict warning, theappoption is ignored; the run proceeds as App Automate.skipAppOverride: falsewith noapp→ fails fast with aSevereServiceErrorbefore any session starts.The option is never forwarded to the hub in
bstack:options(added toNOT_ALLOWED_KEYS_IN_CAPS).Files changed
All in
packages/browserstack-service:src/types.ts— declare theskipAppOverride?: booleanoption (with JSDoc).src/config.ts— App Automate classification honors the option.src/service.ts— the worker-local_isAppAutomate()honors the option.src/util.ts— newvalidateSkipAppOverride()(warning + the three edge cases).src/launcher.ts— invoke the validator once inonPrepare; thefalse+no-app case surfaces asSevereServiceError.src/constants.ts— addskipAppOverrideto the capabilities strip-list.src/cli/modules/automateModule.ts— session name/status endpoint routing honors the option.tests/skipAppOverride.test.ts, plus updates toservice.test.ts,insights-handler.test.ts,tests/cli/modules/automateModule.test.ts..changeset/feat-skip-app-override-v8.md—minorchangeset.Port notes (drift vs upstream)
The upstream backport was authored against
webdriverio/webdriverio@v8, which carries changes this repo'sv8hasn't synced. One hunk was adapted rather than taken verbatim:src/constants.ts— upstream's strip-list already containstestManagementOptions(a separate upstream change not present here), so onlyskipAppOverridewas appended to this repo's current list.Verification
npx tsc --noEmit -p packages/browserstack-serviceclean (afternpm run generate);npm run build(tsc -p tsconfig.prod.json) also exits 0.tests/crash-reporter.test.ts, which is pre-existing onv8(it imports frombuild/and needsnpm run buildfirst; it passes 8/8 once built). The four port-relevant files pass 215/215 in isolation (skipAppOverride.test.ts,service.test.ts,insights-handler.test.ts,cli/modules/automateModule.test.ts).skipAppOverride: truewith the app supplied via anappium:appcap → App Automate session created, one-time warning, no upload;true+ anappoption → conflict warning, option ignored, no upload;falsewith no app → fails fast before any session starts.🤖 Generated with Claude Code