Skip to content

Commit a5c35a8

Browse files
committed
Add maestro E2E test for purchase through paywall
Made-with: Cursor
1 parent d35cc1d commit a5c35a8

3 files changed

Lines changed: 53 additions & 0 deletions

File tree

e2e-tests/maestro/config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# config.yaml
2+
3+
executionOrder:
4+
continueOnFailure: false
5+
6+
flows:
7+
- e2e_tests/*
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This flow tests the purchase through paywall flow.
2+
# It navigates to the purchase screen, verifies initial entitlements,
3+
# presents the paywall, makes a purchase, and verifies entitlements update.
4+
5+
appId: com.revenuecat.automatedsdktests
6+
name: Purchase through paywall
7+
8+
---
9+
- clearState
10+
- pressKey: home
11+
- launchApp
12+
- takeScreenshot: purchase_through_paywall - Initial state after launch
13+
- extendedWaitUntil:
14+
visible: "Test Cases"
15+
timeout: 30000
16+
- takeScreenshot: purchase_through_paywall - After Test Cases visible
17+
- assertVisible: "Test Cases"
18+
- tapOn:
19+
text: "Purchase through paywall"
20+
- extendedWaitUntil:
21+
visible: "Entitlements: none"
22+
timeout: 15000
23+
- assertVisible: "Entitlements: none"
24+
- assertVisible: "Present Paywall"
25+
- tapOn:
26+
text: "Present Paywall"
27+
- assertVisible: "Paywall V2"
28+
- tapOn:
29+
text: "Yearly"
30+
- tapOn:
31+
text: "Continue"
32+
- runFlow:
33+
file: ../utils/confirm_purchase.yaml
34+
- extendedWaitUntil:
35+
visible: "Entitlements: pro"
36+
timeout: 15000
37+
- assertVisible: "Entitlements: pro"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This flow handles the Test Store purchase confirmation.
2+
3+
appId: com.revenuecat.automatedsdktests
4+
name: Confirm purchase - Test Store Purchase Alert
5+
6+
---
7+
- assertVisible: "Test.*Purchase"
8+
- tapOn:
9+
text: "(?i)test valid purchase"

0 commit comments

Comments
 (0)