Skip to content

Add Maestro smoke e2e for the example app (Android + iOS) - #19

Draft
ahsanalidotme wants to merge 7 commits into
mainfrom
test/smoke-e2e
Draft

ahsanalidotme wants to merge 7 commits into
mainfrom
test/smoke-e2e

Conversation

@ahsanalidotme

@ahsanalidotme ahsanalidotme commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #18

What

  • Example app: e2e-only diagnostics panel (testIDs for onLink count, path, source, customData, consent, attribution, trackEvent result) and testIDs on the consent prompt. The SDK key for an e2e run comes from a gitignored example/e2e.config.local.json that Metro resolves (defaults are committed: e2e off, placeholder key). iOS adds kickflip://e2e/open?url=<link> (e2e builds only), which calls handleDeepLink, because an unsigned simulator build has no Associated Domains.
  • Flows (e2e/flows/{android,ios}): consent_prompt (offline), deferred_allow, deferred_deny, reengagement, track_event. Deferred: Android uses the fake Play referrer (debug.linktrail.referrer), iOS uses the Safari interstitial's clipboard token. After each deferred flow the runner checks GET /v1/e2e/clicks/<token> (allow: recorded, attributed, click_token, 1 install; deny: nothing recorded).
  • Runners: e2e/android.sh, e2e/ios.sh, a shared e2e/lib.sh, and e2e/sim-lock.sh (the same machine lock the iOS SDK e2e uses).
  • Version check: e2e/check-native-versions.sh compares the pinned native SDKs with CocoaPods trunk and Maven Central. It only warns for now (NATIVE_VERSION_STRICT=true makes it fail).
  • Workflow .github/workflows/e2e.yml (pull_request + workflow_dispatch): Android on ubuntu with a KVM emulator, iOS on [self-hosted, macOS] under the simulator lock. Without LINKTRAIL_KEY and E2E_TOKEN, only the offline flow runs and the others are skipped with a notice. Fork PRs never run on the self-hosted Mac.
  • Docs: TESTING.md.

Native SDK versions are unchanged.

Notes

  • The Android deferred flows are off (variable E2E_ANDROID_DEFERRED), because io.linktrail:sdk 0.0.5 has no debug fake referrer yet. Turn them on after the next Android release and version bump.

  • The version check currently warns: iOS is pinned at ~> 0.0.11, and the latest on trunk is 0.1.0.

  • Android example applicationId is now io.linktrail.demo.store (same as the native Android example; in the backend e2e allowlist). iOS stays io.linktrail.kickflipdemo.

Five flows per platform: consent prompt (offline), deferred allow and
deny with a backend check of the flow's own click, re-engagement, and
trackEvent with a value. The example shows onLink deliveries on an
e2e-only panel so flows can assert it fired exactly once.

Adds a native SDK version check (report-only), the e2e workflow and
a TESTING.md.
@ahsanalidotme

Copy link
Copy Markdown
Contributor Author

Impact: no database changes. The published package doesn't change: no files under src/, ios/, android/ or the podspec are touched, and the native SDK versions are the same. The changes are in the example app (an e2e panel and testIDs that only show in e2e builds), the scripts and the workflow. The real flows make clicks and installs in the production e2e workspace, and only in CI when the secrets are set. Prod impact: none.

Newer Xcodes refuse AsyncStorage's resource bundle target at 13.0.
Matches the native Android example and the backend's e2e allowlist.
The Kotlin namespace is unchanged.
…Android deferred flows on, strict version check, record error codes
Self-hosted runners aren't available to public repos, so the job never
started. GitHub-hosted macOS is free and unlimited here.
GitHub's macOS image ships Homebrew Ruby 3.4, which no longer bundles kconv,
so pod install failed. Use setup-ruby 3.3 as ios.yml does, and stop putting
Homebrew ahead of it on PATH.
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.

Add smoke e2e tests (Maestro) for the example app on Android and iOS

1 participant