Skip to content

feat: add CircleCI job for maestro E2E tests#859

Draft
ajpallares wants to merge 22 commits intoadd-maestro-e2e-testfrom
add-maestro-e2e-test-ci-job
Draft

feat: add CircleCI job for maestro E2E tests#859
ajpallares wants to merge 22 commits intoadd-maestro-e2e-testfrom
add-maestro-e2e-test-ci-job

Conversation

@ajpallares
Copy link
Copy Markdown
Contributor

@ajpallares ajpallares commented Feb 27, 2026

Summary

  • Adds two separate CircleCI workflows triggered by the maestro_e2e_tests schedule:
    • maestro-e2e-tests-ios: runs on macOS executor, builds the test app for iOS simulator, runs Maestro tests
    • maestro-e2e-tests-android: runs on android:2024.11.1 machine image, creates an Android emulator, builds a debug APK, runs Maestro tests
  • Adds two Fastlane lanes:
    • run_maestro_e2e_tests_ios: replaces API key placeholder, installs deps, builds via xcodebuild, installs on simulator
    • run_maestro_e2e_tests_android: replaces API key placeholder, installs deps, builds via Gradle, installs via adb
  • Both lanes use $RC_E2E_TEST_API_KEY_PRODUCTION_TEST_STORE from the e2e-tests CircleCI context
  • Test results stored as JUnit artifacts

Depends on #858

@ajpallares ajpallares added the pr:feat A new feature label Feb 27, 2026
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 03f5b2c to e9a04bc Compare February 27, 2026 10:35
@ajpallares ajpallares added pr:other and removed pr:feat A new feature labels Feb 27, 2026
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 3f2d2b5 to defa570 Compare March 25, 2026 16:24
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch 2 times, most recently from dd61724 to decc8f8 Compare March 25, 2026 16:45
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 52c925d to 48b6774 Compare March 25, 2026 17:09
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch 3 times, most recently from 27ce740 to 90c203c Compare March 30, 2026 08:33
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 8870d38 to f6d3001 Compare March 30, 2026 11:17
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch 3 times, most recently from edef92a to 5b4dbde Compare March 30, 2026 11:45
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 2cde923 to 391fb83 Compare March 30, 2026 14:41
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 5b4dbde to 7eb0738 Compare March 30, 2026 14:41
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 391fb83 to 2bb2ab0 Compare March 30, 2026 15:03
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 7eb0738 to 5513137 Compare March 30, 2026 15:03
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 2bb2ab0 to 29dff1e Compare March 30, 2026 15:16
ajpallares and others added 7 commits March 30, 2026 17:16
…aestro tests

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Made-with: Cursor
Split the single maestro-e2e-tests workflow into two independent
workflows (maestro-e2e-tests-ios and maestro-e2e-tests-android) so
they run in parallel on their respective platforms.

Made-with: Cursor
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 5513137 to 58ad945 Compare March 30, 2026 15:16
- Prefix Dir.chdir and maestro test paths with ../ since Fastlane
  runs from the fastlane/ subdirectory
- Wait for sys.boot_completed before sending keyevent to emulator

Made-with: Cursor
- Make cordova platform add idempotent (|| true) since platforms
  are already checked into the repo
- Install Ruby 3.2.0 on Android CI machine via rbenv
- Split Android build/test and use circleci/android orb for emulator
- Add --test-output-dir for Maestro screenshots and artifacts
- Add takeScreenshot before assertions for debugging

Made-with: Cursor
The rbenv Ruby 3.2.0 doesn't have cocoapods pre-installed.
cordova build ios calls pod install which needs the pod command.

Made-with: Cursor
cordova build ios calls pod install internally, but running inside
Bundler's context blocked access to the system cocoapods gem.
Use Bundler.with_unbundled_env to temporarily escape Bundler's
environment for the cordova build command.

Made-with: Cursor
Wrap deviceready handler in try/catch to show init errors on screen.
Add timeout fallback to show 'Test Cases' if deviceready never fires,
which helps diagnose whether the Cordova native bridge is working.

Made-with: Cursor
iOS: cordova build was defaulting to "iPhone 16 Plus" which doesn't
exist in the iOS 26.2 runtime. Explicitly target "iPhone 17".

Android: The Maestro test expected native Paywall V2 UI ("Paywall V2",
"Yearly", "Continue") but Cordova uses a custom JS paywall with
"Premium Access" and "Subscribe". Updated test to match actual UI.

Made-with: Cursor
iOS: Replace cordova build with manual xcodebuild to control the
simulator destination (iPhone 17). cordova build defaults to
iPhone 16 Plus which doesn't exist in iOS 26.2.

Android: Add error messages when Purchases SDK is unavailable or
offerings are empty. Add screenshot after tapping Present Paywall
to capture state before assertion. Increase timeout to 30s.

Made-with: Cursor
cordova prepare fails due to project name mismatch (App.xcodeproj vs
MaestroTestApp.xcodeproj). Revert to cordova build and use the --
separator to pass xcodebuild -destination flag targeting iPhone 17.

Made-with: Cursor
The iOS platform directory is fully checked into git, so we can skip
cordova build entirely. Copy www/ assets into the platform dir, run
pod install, and build with xcodebuild targeting iPhone 17 simulator.
This avoids the simulator device selection issue where cordova defaulted
to iPhone 16 Plus which is not available on Xcode 26.3.

Made-with: Cursor
…nstall

Three fixes:
1. iOS: Update bundle ID from com.revenuecat.maestro.e2e to
   com.revenuecat.automatedsdktests to match Maestro test appId
2. iOS: Use rsync instead of cp -R to copy www/ contents into the
   platform dir without creating a nested www/www/ directory, while
   preserving cordova.js and cordova_plugins.js
3. Android: Explicitly install plugin from local repo with
   'cordova plugin add ../../ --force' to ensure the Purchases JS
   bridge is properly linked

Made-with: Cursor
The fetch.json pointed to a non-existent /tmp/ path from the original
development setup. When cordova platform add android runs on CI, it
can't resolve the plugin source. Update to use the correct relative
path (../..) to the repo root. Also simplified the Android build lane
to let cordova platform add handle plugin installation naturally.

Made-with: Cursor
The plugins/cordova-plugin-purchases/ directory is a copy of the full
repo, including its .gitignore which excludes www/. This causes
www/plugin.js to be missing on CI, breaking cordova platform add
since it can't find the JS module file to install.

Made-with: Cursor
@RevenueCat-Danger-Bot
Copy link
Copy Markdown

RevenueCat-Danger-Bot commented Mar 31, 2026

1 Error
🚫 This PR increases the size of the repo by more than 250.00 KB (increased by 310.47 KB).
1 Message
📖 You can bypass the size check failure by adding the label "danger-bypass-size-limit". Please exercise caution.

Generated by 🚫 Danger

The root .gitignore excludes www/ which also matches
platforms/ios/www/. On CI, the Cordova runtime files
(cordova.js, cordova_plugins.js, plugin.js) were missing,
preventing the Purchases JS object from being defined.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants