Skip to content

fix(test-store): don’t mention Play Store in error logs when the Test Store is used#3538

Merged
rickvdl merged 1 commit into
mainfrom
rickvdl/test-store-offering-log-strings
Jun 4, 2026
Merged

fix(test-store): don’t mention Play Store in error logs when the Test Store is used#3538
rickvdl merged 1 commit into
mainfrom
rickvdl/test-store-offering-log-strings

Conversation

@rickvdl

@rickvdl rickvdl commented Jun 4, 2026

Copy link
Copy Markdown
Member

Android counterpart for RevenueCat/purchases-ios#6906, making offering product loading errors test-store aware. This prevents these errors from pointing developers to the Play Store when Test Store is used.

These errors should rarely happen (if at all) but figured it was good to add for consistency.


Note

Low Risk
String-only branching on configured store for logs and configuration errors; behavior unchanged aside from messaging, with unit test coverage.

Overview
When the SDK is configured for Test Store, offering/product configuration errors no longer tell developers to fix things in the Play Store. The change threads appConfig.store into offerings building and picks Test Store–specific copy from OfferingStrings instead of the Play Store templates.

OfferingsFactory now uses Test Store strings for missing-product warnings and for the configuration error when no dashboard products resolve. OfferingParser.createOfferings gains a configuredStore parameter (default Play Store) and routes empty-offering warnings through a small helper that selects the right template. New constants cover cannot-find-product, products-not-found, and empty-offering cases for Test Store (RevenueCat dashboard wording). Tests assert string content and that Test Store flows return the Test Store configuration error without mentioning Play Store.

Reviewed by Cursor Bugbot for commit 4a1b9c3. Bugbot is set up for automated code reviews on this repo. Configure here.

@rickvdl rickvdl added the pr:fix A bug fix label Jun 4, 2026
@rickvdl rickvdl marked this pull request as ready for review June 4, 2026 13:15
@rickvdl rickvdl requested a review from a team as a code owner June 4, 2026 13:15

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Indeed... I would say the only scenarios where this would happen are if there are no test store products configured at all, or for some reason, the requests to fetch those fail... But yeah, I think it doesn't hurt.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.66667% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.11%. Comparing base (88734d9) to head (4a1b9c3).

Files with missing lines Patch % Lines
.../com/revenuecat/purchases/common/OfferingParser.kt 16.66% 5 Missing ⚠️
...cat/purchases/common/offerings/OfferingsFactory.kt 66.66% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3538      +/-   ##
==========================================
- Coverage   80.13%   80.11%   -0.02%     
==========================================
  Files         371      371              
  Lines       15155    15166      +11     
  Branches     2096     2100       +4     
==========================================
+ Hits        12144    12150       +6     
- Misses       2161     2166       +5     
  Partials      850      850              

☔ View full report in Codecov by Harness.
📢 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.

@rickvdl rickvdl added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit 5ddbc02 Jun 4, 2026
39 checks passed
@rickvdl rickvdl deleted the rickvdl/test-store-offering-log-strings branch June 4, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants