Skip to content

Conversation

tonidero
Copy link
Contributor

@tonidero tonidero commented Jul 22, 2025

Description

This adds support for a new test store that allows for easier development testing of purchases. It remains behind a build config flag but for now so not adding anything new for now

@tonidero tonidero force-pushed the support-test-store branch from aba6723 to 61e8a8a Compare July 22, 2025 11:06
@tonidero tonidero force-pushed the support-test-store branch from 61e8a8a to a6c6b60 Compare July 22, 2025 11:08
@tonidero
Copy link
Contributor Author

Still need to test this with the backend changes and the actual posting of the purchase data to the backend is not done, but this is a first approach to supporting the test store @RevenueCat/coresdk.

Copy link

emerge-tools bot commented Jul 28, 2025

📸 Snapshot Test

660 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
TestPurchasesUIAndroidCompatibility Paparazzi
com.revenuecat.testpurchasesuiandroidcompatibility.paparazzi
0 0 0 0 256 0 N/A
TestPurchasesUIAndroidCompatibility
com.revenuecat.testpurchasesuiandroidcompatibility
0 0 0 0 404 0 N/A

🛸 Powered by Emerge Tools

Copy link

codecov bot commented Jul 30, 2025

Codecov Report

❌ Patch coverage is 50.85714% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.34%. Comparing base (9804a47) to head (6fa10be).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
...cat/purchases/teststore/TestStoreBillingWrapper.kt 70.83% 21 Missing and 7 partials ⚠️
...evenuecat/purchases/utils/PreviewOfferingParser.kt 0.00% 26 Missing ⚠️
...om/revenuecat/purchases/utils/AlertDialogHelper.kt 0.00% 14 Missing ⚠️
.../com/revenuecat/purchases/OfferingParserFactory.kt 41.66% 6 Missing and 1 partial ⚠️
.../kotlin/com/revenuecat/purchases/BillingFactory.kt 0.00% 5 Missing ⚠️
.../com/revenuecat/purchases/PurchasesOrchestrator.kt 40.00% 3 Missing ⚠️
...otlin/com/revenuecat/purchases/PurchasesFactory.kt 87.50% 0 Missing and 1 partial ⚠️
...otlin/com/revenuecat/purchases/common/AppConfig.kt 75.00% 0 Missing and 1 partial ⚠️
...t/purchases/teststore/TestStoreProductConverter.kt 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2554      +/-   ##
==========================================
- Coverage   78.70%   78.34%   -0.37%     
==========================================
  Files         295      298       +3     
  Lines       10877    11032     +155     
  Branches     1520     1535      +15     
==========================================
+ Hits         8561     8643      +82     
- Misses       1654     1717      +63     
- Partials      662      672      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tonidero tonidero marked this pull request as ready for review July 30, 2025 08:11
@tonidero tonidero requested a review from a team July 30, 2025 08:11
@tonidero tonidero changed the title [WIP] Support test store Support test store Jul 30, 2025
Copy link
Contributor Author

@tonidero tonidero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review

onError: PurchasesErrorCallback,
) {
debugLog { "TestStoreBillingAbstract: getStorefront - returning US by default" }
onSuccess("US")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need a way to mock this from the backend... I expect some people might ask about it. For now, I think it's ok to hardcode it.

@tonidero tonidero requested a review from a team July 31, 2025 15:40
@tonidero tonidero requested a review from ajpallares August 5, 2025 09:36
Copy link
Member

@ajpallares ajpallares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Amazing job! 🙌

@tonidero tonidero added this pull request to the merge queue Aug 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 5, 2025
@tonidero tonidero added this pull request to the merge queue Aug 5, 2025
Merged via the queue into main with commit 75cd9dc Aug 5, 2025
20 checks passed
@tonidero tonidero deleted the support-test-store branch August 5, 2025 11:54
This was referenced Aug 13, 2025
tonidero pushed a commit that referenced this pull request Aug 14, 2025
**This is an automatic release.**

## RevenueCat SDK
### 📦 Dependency Updates
* [RENOVATE] Update dependency gradle to v9 (#2589) via RevenueCat Git
Bot (@RCGitBot)

## RevenueCatUI SDK
### Customer Center
#### ✨ New Features
* Show a subscribe button in customer center when there are no
subscriptions (#2596) via Facundo Menzella (@facumenzella)
#### 🐞 Bugfixes
* Fix title and price of non-Google purchases in Customer Center (#2576)
via Cesar de la Vega (@vegaro)

### 🔄 Other Changes
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2598) via RevenueCat Git Bot (@RCGitBot)
* Add alias users backend call (#2594) via Toni Rico (@tonidero)
* Rename TestStore to SimulatedStore (#2591) via Toni Rico (@tonidero)
* Fail configure call if using test api key in release builds (#2590)
via Toni Rico (@tonidero)
* Support test store (#2554) via Toni Rico (@tonidero)
* Fix insets in Paywall Tester (#2584) via Cesar de la Vega (@vegaro)
* Add 8.22.1 to CHANGELOG (#2582) via Toni Rico (@tonidero)
* Add warning on V9 CHANGELOG (#2586) via Toni Rico (@tonidero)
* Change metalava job to diff dump generated dump files (#2585) via Toni
Rico (@tonidero)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
tonidero added a commit that referenced this pull request Aug 25, 2025
This adds support for a new test store that allows for easier
development testing of purchases. It remains behind a build config flag
but for now so not adding anything new for now

---------

Co-authored-by: Antonio Pallares <ajpallares@users.noreply.github.com>
@tonidero tonidero mentioned this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants