Skip to content
Draft
7 changes: 7 additions & 0 deletions e2e-tests/maestro/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# config.yaml

executionOrder:
continueOnFailure: false

flows:
- e2e_tests/*
37 changes: 37 additions & 0 deletions e2e-tests/maestro/e2e_tests/purchase_through_paywall.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This flow tests purchasing a product directly.
# Cordova does not have paywall presentation APIs, so instead of
# presenting a native paywall we fetch offerings and purchase the
# first available package directly.

appId: com.revenuecat.automatedsdktests
name: Purchase product

---
- clearState
- pressKey: home
- launchApp
- takeScreenshot: purchase_product - Initial state after launch
- extendedWaitUntil:
visible: "Test Cases"
timeout: 30000
- takeScreenshot: purchase_product - After Test Cases visible
- assertVisible: "Test Cases"
- tapOn:
text: "Purchase product"
- extendedWaitUntil:
visible: "Entitlements: none"
timeout: 15000
- assertVisible: "Entitlements: none"
- extendedWaitUntil:
visible: "^Purchase$"
timeout: 30000
- takeScreenshot: purchase_product - Purchase screen ready
- tapOn:
id: "purchase-btn"
- runFlow:
file: ../utils/confirm_purchase.yaml
- extendedWaitUntil:
visible: "Entitlements: pro"
timeout: 15000
- takeScreenshot: purchase_product - Entitlements unlocked
- assertVisible: "Entitlements: pro"
10 changes: 6 additions & 4 deletions e2e-tests/maestro/purchase_flow.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
appId: com.revenuecat.maestro.e2e
appId: com.revenuecat.automatedsdktests
---
- launchApp
- extendedWaitUntil:
visible: "Test Cases"
timeout: 15000
- assertVisible: "Purchase through paywall"
- tapOn: "Purchase through paywall"
- assertVisible: "Purchase product"
- tapOn: "Purchase product"
- extendedWaitUntil:
visible: "Entitlements: none"
timeout: 15000
- assertVisible: "Present Paywall"
- extendedWaitUntil:
visible: "^Purchase$"
timeout: 30000
9 changes: 9 additions & 0 deletions e2e-tests/maestro/utils/confirm_purchase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This flow handles the Test Store purchase confirmation.

appId: com.revenuecat.automatedsdktests
name: Confirm purchase - Test Store Purchase Alert

---
- assertVisible: "Test.*Purchase"
- tapOn:
text: "(?i)test valid purchase"