Fix/sdk 7093 appautomate session name - #116
Merged
hamza-browserstack merged 8 commits intoJul 29, 2026
Merged
Conversation
…sion name/status (SDK-7093) When the app is supplied only via the appium:app capability (not the top-level browserstack service `app` option), this.config.app is undefined, so isAppAutomate resolved false and the session name/status PUT was routed to the web Automate endpoint for an App Automate session — returning a swallowed 404, leaving the static sessionName capability on the dashboard. Route both markSessionName and markSessionStatus through a new isAppAutomate() helper that also inspects the input + resolved capabilities for appium:app / appium:options.app, mirroring accessibilityModule.isAppAutomateSession. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…K-7093) Address SDK PR review findings on #100: - Promote hasAppCap + APP_AUTOMATE_CAP_KEYS from config.ts (file-local) to util.ts as a shared export; config.ts reuses it (no behavior change). - automateModule.isAppAutomate() reuses hasAppCap — now covers all app-cap keys (appium:app / appium:bundleId / appium:appPackage / appium:appActivity / appium:options.app) instead of only appium:app. - percyModule: fix the same service-config-only detection (`'app' in this.config`) that misrouted Percy screenshots to the web Automate path for appium:app sessions — now resolves App Automate via hasAppCap over browser + input caps. - changeset: note now covers session name, status, and Percy routing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sors (SDK-7093) The reuse refactor made automateModule + percyModule depend on the shared util.hasAppCap and (for the capability fallback) AutomationFramework getTrackedInstance/getState. Update the unit-test mocks accordingly: - automateModule.test: add hasAppCap to the wholesale util.js mock (was undefined → threw → swallowed → fetch never called). - percyModules.test: add getTrackedInstance/getState to the AutomationFramework mock so onAfterCreate's isAppAutomateSession() no longer throws. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… BaseModule (SDK-7093) Addresses the PR #100 DRY review suggestions: automateModule.isAppAutomate() and percyModule.isAppAutomateSession() duplicated the same getTrackedInstance() + [INPUT_CAPABILITIES, CAPABILITIES] hasAppCap loop. Extract it once into BaseModule.hasAppCapInFrameworkState() (the common parent of both modules); both now delegate to it. Placed on BaseModule rather than as an exported util.ts function (as literally suggested) to avoid a circular import: util.ts -> automationFramework.ts -> cliUtils.ts -> util.ts. BaseModule already sits above both modules and can import AutomationFramework + the shared util.hasAppCap without a cycle. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
hamza-browserstack
requested review from
dandonarahul2002 and
rounak610
and removed request for
a team
July 29, 2026 18:03
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 is this about?
Related Jira task/s
Release (mandatory for every PR — required for the
ready-for-reviewlabel)Version bump: (required — tick exactly one)
Release notes type: (optional)
Release notes (customer-facing): (optional but encouraged)
Release notes (internal): (required — engineer-facing; what actually changed / why)
Checklist
PR Validations
Run Tests: Comment RUN_TESTS to trigger sanity tests.