Skip to content

Fix/sdk 7093 appautomate session name - #116

Merged
hamza-browserstack merged 8 commits into
sdk_v9_pre_prodfrom
fix/sdk-7093-appautomate-session-name
Jul 29, 2026
Merged

Fix/sdk 7093 appautomate session name#116
hamza-browserstack merged 8 commits into
sdk_v9_pre_prodfrom
fix/sdk-7093-appautomate-session-name

Conversation

@hamza-browserstack

Copy link
Copy Markdown
Contributor

What is this about?

Related Jira task/s

Release (mandatory for every PR — required for the ready-for-review label)

Version bump: (required — tick exactly one)

  • minor (backwards-compatible feature)
  • patch (bug fix or other small change)

Release notes type: (optional)

  • New Feature
  • Bug Fix
  • Other Improvement

Release notes (customer-facing): (optional but encouraged)

Release notes (internal): (required — engineer-facing; what actually changed / why)

Checklist

  • Ready to review
  • Has it been tested locally?

PR Validations

Run Tests: Comment RUN_TESTS to trigger sanity tests.

pri-gadhiya and others added 8 commits July 27, 2026 16:00
…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
hamza-browserstack requested a review from a team as a code owner July 29, 2026 18:03
@hamza-browserstack
hamza-browserstack requested review from dandonarahul2002 and rounak610 and removed request for a team July 29, 2026 18:03
@hamza-browserstack
hamza-browserstack merged commit cbf2f4a into sdk_v9_pre_prod Jul 29, 2026
16 of 17 checks 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