Skip to content

chore: [SDK-4406] prepare Unity demo app for Appium E2E tests#869

Open
fadi-george wants to merge 52 commits into
mainfrom
fadi/sdk-4406-use-appium-tests-for-unity
Open

chore: [SDK-4406] prepare Unity demo app for Appium E2E tests#869
fadi-george wants to merge 52 commits into
mainfrom
fadi/sdk-4406-use-appium-tests-for-unity

Conversation

@fadi-george
Copy link
Copy Markdown
Collaborator

@fadi-george fadi-george commented May 15, 2026

Description

One Line Summary

Prepare the Unity demo app for Appium E2E test automation by adding accessibility bridges, stabilizing UI element naming, and improving iOS/Android test reliability.

Details

Motivation

SDK-4406: enable Appium-driven E2E tests against the Unity demo app. Unity's UI Toolkit does not expose native accessibility identifiers, so Appium cannot reliably locate elements on iOS or Android. This PR adds native accessibility bridges (iOS and Android), standardizes UI element names, and fixes a number of demo-side bugs uncovered while wiring up the test harness.

Scope

  • Only examples/demo/ is touched. No SDK source changes.
  • Adds a C# AccessibilityBridge plus iOS (OneSignalDemoKeyboard.mm) and Android (OneSignalUnityE2EAccessibility.java) native helpers used to expose UI elements to Appium.
  • Adds an iOS signing post-processor and arm64 simulator config so the demo builds cleanly on Apple Silicon CI.
  • Demo refactors: removes the in-app LogView/LogManager (replaced with Debug.Log), renames TrackEventSectionController to CustomEventsSectionController, consolidates upsert helpers, replaces the loading overlay with inline loading states, and tightens dialog/keyboard behavior.
  • Fixes stale Android UI Toolkit click targets after dialogs are dismissed, so repeated modal flows route clicks to the current visible element.
  • Gates Android WebView debugging to active IAM display windows in E2E mode, which prevents dismissed IAM WebView contexts from leaking into later Appium checks.
  • Bumps Unity editor version and demo packages.

Testing

Manual testing

  • Built and ran the demo on iOS Simulator (arm64, Apple Silicon) and Android emulator.
  • Verified Appium can locate and interact with home screen sections, dialogs, toggles, and toasts via the accessibility bridge.
  • Smoke-tested core demo flows: login/logout, aliases, tags, triggers, push send, IAM, custom events, location, live activities.
  • Ran Unity Android locally: ./run-local.sh --sdk=unity --platform=android --spec="{01_,02_,03_}".
  • Re-ran Unity Android locally with --skip-build for 01_ through 12_; all numbered specs passed.

Affected code checklist

  • None - demo app only, no SDK changes.

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing (demo prep for Appium E2E)
  • No public API changes

Testing

  • Manually tested on iOS Simulator and Android emulator
  • No SDK behavior changes, so no new unit tests needed

Final pass

  • Code reviewed

Made with Cursor

Comment thread examples/demo/Assets/Scripts/UI/Dialogs/MultiPairInputDialog.cs Outdated
Comment thread examples/demo/Assets/Scripts/Services/AccessibilityBridge.cs Outdated
Comment thread examples/demo/Assets/Scripts/UI/Sections/SectionBuilder.cs
Comment thread examples/demo/Assets/Scripts/UI/Sections/SectionBuilder.cs Outdated
fadi-george and others added 8 commits May 14, 2026 23:54
Row TextField names were derived from `_rows.Count` at construction time,
but RemoveRow does not renumber survivors. After Add+Remove(middle)+Add,
the new row's name collided with an existing survivor's name, and
AccessibilityBridge.WalkAndUpsert dedupes by name (first-wins) — so the
new row was silently dropped from the a11y tree and Appium taps landed
on the stale row. Switch to a monotonic `_nextRowIndex++` so names are
permanently unique regardless of remove ordering.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george
Copy link
Copy Markdown
Collaborator Author

@claude review

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.

1 participant