Skip to content

feat: [SDK-4691] add native Android SDK support and refactor appium helpers#36

Merged
fadi-george merged 25 commits into
mainfrom
fadi/sdk-4691
May 20, 2026
Merged

feat: [SDK-4691] add native Android SDK support and refactor appium helpers#36
fadi-george merged 25 commits into
mainfrom
fadi/sdk-4691

Conversation

@fadi-george
Copy link
Copy Markdown
Contributor

Description

Adds native Android SDK support to the Appium E2E test harness and refactors the supporting helpers to be smaller and easier to maintain. Also includes a few targeted fixes uncovered while wiring up the native Android run.

Linear: SDK-4691

Details

Native Android support

  • Added feat(appium): add native Android SDK support so the existing harness can target the native Android SDK alongside the cross-platform SDKs.
  • Pass the app ID to Gradle via -P props instead of hardcoded values.
  • Auto-correct platform when the native Android SDK is selected.
  • Apply switchToNativeContext uniformly across SDKs and unify the snackbar check via the native context.

Helper refactors (appium/tests/helpers/app.ts, selectors.ts)

  • Trimmed app.ts from ~650 to ~250 lines by removing dead code, unused fast paths, and duplicated branches.
  • Removed the dismissKeyboard helper and its callers, the withRetryDelay helper, and Unity-specific modal workarounds.
  • Extracted waitForPushId and IAM context helpers, simplified isVisibleInViewport, checkInAppMessage, scroll helpers, and IAM trigger tap.
  • Derived SdkType from a const array; hardcoded the package ID constant; always await webview visibility.

Fixes

  • Clear stale UiAutomator2 state on Android between runs.
  • Include bundleId in the iOS appPackageName lookup.
  • Move the Flutter post-swipe pause outside the swipe loop and drop the per-scroll pause.
  • Fix viewport visibility for SDK types.

Tooling and docs

  • appium/scripts/run-all.sh and run-local.sh updates to support the new SDK and a new --quiet/-q flag to suppress INFO logs.
  • demo/build.md clarifications to the build guide structure, test IDs, and input field docs.

Affected code

  • Appium E2E test harness (appium/)
  • Demo build docs (demo/build.md)
  • Production SDK code

Testing

  • Ran the appium suite locally against the native Android SDK and the existing SDKs to confirm parity.
  • Verified 02_push.spec.ts still passes with the new waitForPushId helper.

Checklist

  • Refactor only changes preserve existing behavior
  • Linear ticket linked
  • No breaking API changes

Made with Cursor

@fadi-george fadi-george requested a review from a team as a code owner May 20, 2026 18:57
Comment thread appium/tests/helpers/app.ts
@fadi-george fadi-george merged commit 173b856 into main May 20, 2026
3 checks passed
@fadi-george fadi-george deleted the fadi/sdk-4691 branch May 20, 2026 19:58
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