Adds Maestro test making a purchase on a v2 Paywall#2866
Adds Maestro test making a purchase on a v2 Paywall#2866JayShortway wants to merge 1 commit intomaestro-google-loginfrom
Conversation
| output.rcApiV1 = { | ||
| revokeGooglePlaySubscription: revokeGooglePlaySubscription | ||
| } |
There was a problem hiding this comment.
This follows the Shared Functions approach from the Maestro docs, which makes calling these APIs convenient from Maestro flows. We can add more RC API v1 calls to this file as needed.
|
|
||
| defaultConfig { | ||
| applicationId = "com.revenuecat.e2etests" | ||
| applicationId = "com.revenuecat.automatedsdktests" |
There was a problem hiding this comment.
What shall we do here? Some options:
- Change the application ID in the Production Integration Tests Android RC project.
- Remove the Production Integration Tests Android RC project in favor of the Automated SDK Testing RC project.
- Make the application ID configurable from the command line.
I think option 2 has my preference.
There was a problem hiding this comment.
Hmm I think we don't use com.revenuecat.e2etests anywhere right now? (it works since it used to use the test store). But yeah, we do need a real package name for tests that test the Google flow.
I'm fine with option 2, but we will need to change the android backend integration tests as well to use the new API key and see if there are any changes. Additionally, for changing the "Purchases integration tests" it will likely require changing a bunch of environment variables.
But in any case, I do think option 2 makes the most sense, even if it's a bit more work 👍
tonidero
left a comment
There was a problem hiding this comment.
Really love this. Amazing job!
| // Setting the label as testTag for the value Text is on purpose. It allows us to do thinks like this | ||
| // in Maestro: | ||
| // - copyTextFrom: | ||
| // id: "Original App User ID" | ||
| // to extract the value. | ||
| testTag = label | ||
| testTagsAsResourceId = true |
rickvdl
left a comment
There was a problem hiding this comment.
Awesome work, happy to see it running soon 🚀
| file: subscribe/subscribe.yml | ||
| - tapOn: Customer Info | ||
| - assertVisible: "pro: " | ||
| - assertVisible: "${'Active: true, Product: ' + PRODUCT_ID}" |
There was a problem hiding this comment.
This is something would be nice to align with iOS
| - assertVisible: "${'Active: true, Product: ' + PRODUCT_ID}" | ||
| - copyTextFrom: | ||
| id: "Original App User ID" | ||
| - evalScript: ${output.rcApiV1.revokeGooglePlaySubscription(maestro.copiedText, PRODUCT_ID)} |
| } | ||
|
|
||
| function revokeGooglePlaySubscription(appUserId, productId) { | ||
| return http.post( |
There was a problem hiding this comment.
Great that you've managed to get this to work with the limited scripting abilities
Description
Note: based on #2788.
Adds a Maestro test that makes a Google Play purchase and immediately revokes it with the RevenueCat API, to allow testing again.
This can be merged, but it's just a POC. Still to do: