Skip to content

Add maestro E2E test app#1654

Merged
ajpallares merged 8 commits intomainfrom
e2e-tests-app
Apr 15, 2026
Merged

Add maestro E2E test app#1654
ajpallares merged 8 commits intomainfrom
e2e-tests-app

Conversation

@ajpallares
Copy link
Copy Markdown
Member

@ajpallares ajpallares commented Feb 27, 2026

Summary

Adds a Maestro E2E test app under e2e-tests/MaestroTestApp/ — a minimal Flutter app with two screens used by automated Maestro flows to verify the RevenueCat purchase integration.

  • Two screens: "Test Cases" list and "Purchase through paywall" (presents a RevenueCat V2 paywall and displays entitlement status)
  • Bundle ID com.revenuecat.automatedsdktests
  • API key placeholder (MAESTRO_TESTS_REVENUECAT_API_KEY) replaced at CI time via sed
  • Local SDK resolution via path: references + dependency_overrides (same mechanism as revenuecat_examples/purchase_tester)
  • iOS plugins resolved via Swift Package Manager (FlutterGeneratedPluginSwiftPackage); CocoaPods only carries the Flutter engine
  • Errors from getCustomerInfo and presentPaywall are surfaced in the UI for debugging failed Maestro flows

Counterpart PRs: react-native-purchases#1635, purchases-capacitor#699, cordova-plugin-purchases#857, purchases-unity#836, purchases-kmp#708

Follow-up PRs (stacked)

  • #1698 — Maestro test flows (YAML)
  • #1699 — CircleCI jobs to run the tests
  • #1714 — Launch argument routing to skip test list

Note

Low Risk
Adds a new, isolated test-only Flutter project with standard iOS/Android scaffolding and a simple paywall purchase flow; it does not modify the SDK runtime code paths.

Overview
Introduces a new Flutter app in e2e-tests/MaestroTestApp intended for Maestro E2E automation, including a test-case list screen and a purchase flow that calls RevenueCatUI.presentPaywall() and displays active pro entitlement state.

Adds full iOS/Android project scaffolding (manifests, Gradle/Xcode configs, app IDs) plus local path: dependencies on purchases_flutter/purchases_ui_flutter, and documents CI-time API key injection via the MAESTRO_TESTS_REVENUECAT_API_KEY placeholder.

Reviewed by Cursor Bugbot for commit cb1f2f4. Bugbot is set up for automated code reviews on this repo. Configure here.

Made-with: Cursor
The default Flutter widget test references MyApp which doesn't exist
in this project (the app class is MaestroTestApp).

Made-with: Cursor
- Lower Gradle JVM from 8G/4G to 4G/2G (sufficient for a minimal test app)
- Simplify README setup: flutter pub get is all that's needed

Made-with: Cursor
- Add `mounted` guard before every setState after an async gap
- Remove unused Widget Key identifiers (Maestro uses text selectors)
- Add flutter_lints to dev_dependencies (analysis_options.yaml referenced it)
- Remove leftover flutter create TODO comments from build.gradle.kts
- Remove CocoaPods from README prerequisites (flutter build handles it)

Made-with: Cursor
ajpallares added a commit to RevenueCat/react-native-purchases that referenced this pull request Apr 9, 2026
## Summary

Adds a Maestro E2E test app under `e2e-tests/MaestroTestApp/` — a
minimal React Native app with two screens used by automated Maestro
flows to verify the RevenueCat purchase integration.

- Two screens: "Test Cases" list and "Purchase through paywall"
(presents a RevenueCat V2 paywall and displays entitlement status)
- Bundle ID `com.revenuecat.automatedsdktests`
- API key placeholder (`MAESTRO_TESTS_REVENUECAT_API_KEY`) replaced at
CI time via `sed`
- Local SDK resolution via Yarn workspace +
`babel-plugin-module-resolver` + Metro `watchFolders` (same mechanism as
`purchaseTesterTypescript`)
- Errors from `getCustomerInfo` and `presentPaywall` are surfaced in the
UI (not just logged) for Maestro screenshot capture
- Uses `testID` props for reliable Maestro element targeting
- Typed navigation with `RootStackParamList`
- Includes a README and committed `Podfile.lock`

Counterpart PRs:
[purchases-flutter#1654](RevenueCat/purchases-flutter#1654),
[purchases-capacitor#699](RevenueCat/purchases-capacitor#699),
[cordova-plugin-purchases#857](RevenueCat/cordova-plugin-purchases#857),
[purchases-unity#836](RevenueCat/purchases-unity#836),
[purchases-kmp#708](RevenueCat/purchases-kmp#708)

### Follow-up PRs (stacked)
-
[#1636](#1636)
— Maestro test flows (YAML)
-
[#1637](#1637)
— CircleCI jobs to run the tests

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@ajpallares ajpallares marked this pull request as ready for review April 15, 2026 08:59
@ajpallares ajpallares requested a review from a team as a code owner April 15, 2026 08:59
@ajpallares ajpallares requested a review from a team April 15, 2026 08:59
Copy link
Copy Markdown
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great!! Excited to have this 🙌

Comment thread e2e-tests/MaestroTestApp/android/settings.gradle.kts
Comment thread e2e-tests/MaestroTestApp/ios/Podfile Outdated
Comment thread e2e-tests/MaestroTestApp/lib/test_cases_screen.dart Outdated
- Remove Podfile and Podfile.lock (project already uses SPM via
  FlutterGeneratedPluginSwiftPackage; zero CocoaPods refs in pbxproj)
- Remove Pods #include? from Debug/Release xcconfig
- Add enable-swift-package-manager: true to pubspec.yaml
- Extract test case definitions to test_cases.dart for extensibility
  (single source of truth for title, flowKey, and screen widget)
- Refactor TestCasesScreen to build from the shared list

Made-with: Cursor
Avoids eagerly constructing all screen widgets upfront — the widget
is only created when the user navigates to it.

Made-with: Cursor
@ajpallares ajpallares merged commit 654e41b into main Apr 15, 2026
15 checks passed
@ajpallares ajpallares deleted the e2e-tests-app branch April 15, 2026 11:03
ajpallares added a commit that referenced this pull request Apr 15, 2026
## Summary
- Adds Maestro YAML test files for the "purchase through paywall" E2E
flow
- Adds `config.yaml` for Maestro test execution
- Test flow: clear state → launch app → navigate to purchase screen →
verify no entitlements → present V2 paywall → select "Yearly" → tap
"Continue" → confirm purchase → verify "pro" entitlement
- Adds `utils/confirm_purchase.yaml` utility that handles test store
purchase confirmation on both iOS and Android

Depends on #1654

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Adds new Maestro E2E test YAMLs and a shared purchase-confirmation
flow; no production code paths are changed. Risk is limited to test
flakiness due to UI text/timeouts and store confirmation dialogs.
> 
> **Overview**
> Adds a Maestro E2E flow that drives the app through **purchase via the
V2 paywall** (select yearly, continue, confirm purchase) and asserts
entitlements change from `none` to `pro`.
> 
> Introduces a shared `utils/confirm_purchase.yaml` step for handling
the test-store purchase confirmation dialog, plus a `config.yaml` to run
all flows under `e2e_tests/*` with fail-fast execution.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
48b6b03. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
This was referenced Apr 16, 2026
RCGitBot added a commit that referenced this pull request Apr 17, 2026
**This is an automatic release.**

## RevenueCat SDK
### 🐞 Bugfixes
* [EXTERNAL] Fix Wasm incompatibility in web error processing (#1684)
contributed by @brunovsiqueira (#1722) via Toni Rico (@tonidero)
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 18.1.0 (#1726) via
RevenueCat Git Bot (@RCGitBot)
* [Android
10.2.0](https://github.com/RevenueCat/purchases-android/releases/tag/10.2.0)
* [iOS
5.68.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.68.0)

### 🔄 Other Changes
* Add retry mechanism to Maestro e2e tests (#1723) via Antonio Pallares
(@ajpallares)
* Bump fastlane-plugin-revenuecat_internal from `20911d1` to `a1eed48`
(#1725) via dependabot[bot] (@dependabot[bot])
* Skip test cases list in maestro tests using launch arguments (#1714)
via Antonio Pallares (@ajpallares)
* Add CircleCI job for maestro E2E tests (#1699) via Antonio Pallares
(@ajpallares)
* Add maestro E2E test for purchase through paywall (#1698) via Antonio
Pallares (@ajpallares)
* Add maestro E2E test app (#1654) via Antonio Pallares (@ajpallares)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk release bookkeeping: primarily version bumps and
changelog/version-matrix updates, with no functional logic changes in
the plugin code beyond reporting the new version string.
> 
> **Overview**
> Updates the SDKs to **v`10.0.1`** by bumping version identifiers
across `pubspec.yaml`, Android Gradle configs, and iOS/macOS podspecs
(including the runtime-reported plugin version strings).
> 
> Refreshes release documentation (`CHANGELOG.md`,
`CHANGELOG-LATEST.md`, `VERSIONS.md`) to include the `10.0.1` notes
(Wasm web error-processing fix) and the dependency bump to
`purchases-hybrid-common` `18.1.0` (Android `10.2.0`, iOS `5.68.0`).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ff0bb5e. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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