diff --git a/e2e-tests/maestro/config.yaml b/e2e-tests/maestro/config.yaml new file mode 100644 index 00000000..9f9b72d0 --- /dev/null +++ b/e2e-tests/maestro/config.yaml @@ -0,0 +1,7 @@ +# config.yaml + +executionOrder: + continueOnFailure: false + +flows: + - e2e_tests/* diff --git a/e2e-tests/maestro/e2e_tests/purchase_through_paywall.yaml b/e2e-tests/maestro/e2e_tests/purchase_through_paywall.yaml new file mode 100644 index 00000000..c8c77376 --- /dev/null +++ b/e2e-tests/maestro/e2e_tests/purchase_through_paywall.yaml @@ -0,0 +1,35 @@ +# This flow tests the purchase through paywall flow. +# It navigates to the purchase screen, verifies initial entitlements, +# presents the paywall, makes a purchase, and verifies entitlements update. + +appId: com.revenuecat.automatedsdktests +name: Purchase through paywall + +--- +- clearState +- pressKey: home +- launchApp +- extendedWaitUntil: + visible: "Test Cases" + timeout: 30000 +- assertVisible: "Test Cases" +- tapOn: + text: "Purchase through paywall" +- extendedWaitUntil: + visible: "Entitlements: none" + timeout: 15000 +- assertVisible: "Entitlements: none" +- assertVisible: "Present Paywall" +- tapOn: + text: "Present Paywall" +- assertVisible: "Paywall V2" +- tapOn: + text: "Yearly" +- tapOn: + text: "Continue" +- runFlow: + file: ../utils/confirm_purchase.yaml +- extendedWaitUntil: + visible: "Entitlements: pro" + timeout: 15000 +- assertVisible: "Entitlements: pro" diff --git a/e2e-tests/maestro/utils/confirm_purchase.yaml b/e2e-tests/maestro/utils/confirm_purchase.yaml new file mode 100644 index 00000000..2c0dfe91 --- /dev/null +++ b/e2e-tests/maestro/utils/confirm_purchase.yaml @@ -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"