Add maestro E2E test for purchase through paywall#837
Draft
ajpallares wants to merge 19 commits into
Draft
Conversation
8bfcd72 to
bc1a466
Compare
10a37d7 to
df2c385
Compare
df2c385 to
dd86a57
Compare
Made-with: Cursor
1bd37e2 to
d35cc1d
Compare
dd86a57 to
a5c35a8
Compare
Adds takeScreenshot steps at purchase screen, paywall, and entitlements unlocked stages for consistency with other SDKs. Made-with: Cursor
These steps were only used for debugging CI failures and add unnecessary clutter to the CI report. Made-with: Cursor
…stApp - Call SceneSetup.SetupScene() from BuildIOS/BuildAndroid to combine into a single Unity invocation - Set Android minSdkVersion to 24 (required by PHC-UI 18.1.0) - Strip unnecessary packages (Ads, Analytics, Purchasing, Timeline, etc.) from manifest.json (39 -> 11 packages) - Commit packages-lock.json, ProjectSettings/, .gitignore, .meta files, and the generated Main scene Made-with: Cursor
Generated by 🚫 Danger |
…stApp The RevenueCat SDK dependencies require Java 17 source compatibility. Without custom Gradle templates, Unity defaults to Java 8 which causes compileReleaseJavaWithJavac to fail. Made-with: Cursor
The Unity-generated Xcode project needs PurchasesHybridCommon and PurchasesHybridCommonUI pods installed. The xcode_build_maestro_test_app Fastlane lane now generates a Podfile, runs pod install, and builds using the xcworkspace instead of the xcodeproj. Made-with: Cursor
The RevenueCat native plugin .m files are compiled inside the UnityFramework target, not Unity-iPhone. The CocoaPods dependencies need to be available to UnityFramework for the modules to be found. Made-with: Cursor
Swift pods need framework-style integration to properly generate and expose their -Swift.h umbrella headers. Using static linkage keeps binary size down while enabling module imports in the UnityFramework target. Made-with: Cursor
Set PlayerSettings.iOS.sdkVersion = iOSSdkVersion.SimulatorSDK in BuildIOS() so Unity generates an Xcode project with simulator-compatible IL2CPP compilation. Simplify xcodebuild to use -destination instead of manual -sdk/-arch overrides. Made-with: Cursor
Unity reports 'build target unsupported' when SimulatorSDK is set. Instead, build for the standard iOS device target in Unity and let xcodebuild handle simulator targeting via -sdk iphonesimulator. On macOS, the IL2CPP GameAssembly script phase will pick up the correct simulator SDK from xcodebuild's environment. Made-with: Cursor
Unity 6 defaults to Vulkan on Android, which isn't well supported on x86_64 emulators. Force OpenGLES3 to ensure the app renders correctly on CI emulators. Made-with: Cursor
Unity UGUI renders on a single GLSurfaceView, so Maestro cannot discover text elements in the Android accessibility tree. This adds a transparent native overlay with real Android TextViews positioned at the same screen coordinates as UGUI elements, enabling Maestro to find and interact with them. Made-with: Cursor
Wrap overlay initialization in try-catch to prevent app crashes if the native overlay fails. Remove anonymous FrameLayout subclass that could cause class loading issues. Made-with: Cursor
The native overlay was causing the app to quit immediately after gaining focus. Reverting to investigate a simpler approach. Made-with: Cursor
Unity UGUI renders on a single GLSurfaceView so elements aren't exposed to the Android accessibility tree. Switch to coordinate-based taps for UGUI screens (derived from SceneSetup.cs anchors) while keeping text-based assertions for the native paywall. Made-with: Cursor
The arm64-only APK crashes with SIGILL when running through the x86_64 emulator's ARM translation layer. Adding x86_64 as a target architecture allows the app to run natively on CI emulators. Made-with: Cursor
Add Debug.Log to MaestroTestApp.Start() to diagnose why the app exits. Restore original Maestro flow with text-based assertions to confirm the app stays alive (as it did in pipeline #4005). Made-with: Cursor
The previous overlay attempt failed because of an unrelated SIGILL crash from arm64-on-x86_64 emulation. With x86_64 native build in place, the overlay should work. Also fix NullReferenceException in Purchases.Configure() by adding DefaultExecutionOrder(100) to MaestroTestApp so Purchases.Start() runs first and initializes the native wrapper before we use it. 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
config.yamlfor Maestro test executionutils/confirm_purchase.yamlutility that handles test store purchase confirmation on both iOS and Android (using regex to match platform-specific alert text)Depends on #836