-
Notifications
You must be signed in to change notification settings - Fork 111
Add maestro E2E test for purchase through paywall #1636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f8ce9f7
5cda4d6
218eefe
18d9a41
ef166de
0102aa8
73da28c
2a5d507
22530ca
a231be2
5547354
7d5ac03
f5276e7
8234eb8
9c43d51
75986fa
57b3bf3
e9d206f
86a3b0b
dd68b80
666833f
e078ea8
501ef9f
d61badc
cf0ccbc
1a554ee
c91d3d7
87e8ba3
82fa025
79ca5af
795e8a7
6fc2caa
2bd0cb0
8867ce7
2f04c19
6a07bb5
bc7a053
8ce936b
5cb2ea8
d92bf51
454a543
dcbdeea
b19bac4
403c2bb
e1d8921
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # config.yaml | ||
|
|
||
| executionOrder: | ||
| continueOnFailure: false | ||
|
|
||
| flows: | ||
| - e2e_tests/* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # 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 | ||
| - assertVisible: "Test Cases" | ||
| - tapOn: | ||
| text: "Purchase through paywall" | ||
| - 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 | ||
| - assertVisible: "Entitlements: pro" | ||
| 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" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at this issue, maybe we could do something like this instead: This way we tap on the exact string. But not a blocker I would say. I think what you have also works!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice suggestion! My idea was to keep it case insensitive with the purpose of changing the texts in the natives to have them match. So I've created RevenueCat/purchases-android#3314 which makes the texts the same (which I think is desirable regardless 😄). And also #1724 for the same alert in this repo |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be worth to add snapshots of this paywall + The screen after a purchase is completed and perform some verification on those snapshots, so we're aware of unintended changes? Of course, this can come in follow-up PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Will take a note to add it to a follow-up PR. Thanks for the suggestion!