feat: add CircleCI job for maestro E2E tests#859
Draft
ajpallares wants to merge 22 commits intoadd-maestro-e2e-testfrom
Draft
feat: add CircleCI job for maestro E2E tests#859ajpallares wants to merge 22 commits intoadd-maestro-e2e-testfrom
ajpallares wants to merge 22 commits intoadd-maestro-e2e-testfrom
Conversation
d58e6e1 to
71131a2
Compare
03f5b2c to
e9a04bc
Compare
3f2d2b5 to
defa570
Compare
dd61724 to
decc8f8
Compare
52c925d to
48b6774
Compare
27ce740 to
90c203c
Compare
8870d38 to
f6d3001
Compare
edef92a to
5b4dbde
Compare
2cde923 to
391fb83
Compare
5b4dbde to
7eb0738
Compare
391fb83 to
2bb2ab0
Compare
7eb0738 to
5513137
Compare
2bb2ab0 to
29dff1e
Compare
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…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
Made-with: Cursor
…o tests Made-with: Cursor
Made-with: Cursor
5513137 to
58ad945
Compare
Made-with: Cursor
- 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
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
maestro_e2e_testsschedule:maestro-e2e-tests-ios: runs on macOS executor, builds the test app for iOS simulator, runs Maestro testsmaestro-e2e-tests-android: runs onandroid:2024.11.1machine image, creates an Android emulator, builds a debug APK, runs Maestro testsrun_maestro_e2e_tests_ios: replaces API key placeholder, installs deps, builds via xcodebuild, installs on simulatorrun_maestro_e2e_tests_android: replaces API key placeholder, installs deps, builds via Gradle, installs via adb$RC_E2E_TEST_API_KEY_PRODUCTION_TEST_STOREfrom thee2e-testsCircleCI contextDepends on #858