Skip to content

test: cover attribution, logging, and ad-tracking pass-through calls - #1022

Merged
vegaro merged 4 commits into
mainfrom
cesar/unity-wrapper-passthrough-followup
Aug 28, 2026
Merged

test: cover attribution, logging, and ad-tracking pass-through calls#1022
vegaro merged 4 commits into
mainfrom
cesar/unity-wrapper-passthrough-followup

Conversation

@vegaro

@vegaro vegaro commented Jul 29, 2026

Copy link
Copy Markdown
Member

Follow-up to #1010 for @rickvdl two comments


Note

Low Risk
Test-only changes with no production or runtime behavior modifications.

Overview
Expands EditMode wrapper passthrough coverage so the Purchases facade is exercised against PurchasesWrapperSpy, following up on prior pass-through test work (#1010).

Adds AttributionPassthroughTests, which parameterizes every string attribution/subscriber-attribute setter (email, MMP IDs, campaign fields, etc.) to assert the value reaches IPurchasesWrapper unchanged, plus a case that null is forwarded for attribute deletion.

WrapperPassthroughTests gains many new one-shot delegate tests (log level, deprecated debug/account flags, sync APIs, log handler, code redemption sheet, Ad Services token collection, identity/configuration getters, cached virtual currencies) and tightens AppsFlyer conversion data serialization checks for booleans, numeric types, and raw JSON shape. SetAdjustID coverage moves into the attribution suite; TrackingTests now asserts custom paywall impression params are passed by reference to the wrapper.

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

@vegaro vegaro added the pr:other Changes to our CI configuration files and scripts label Jul 29, 2026
@vegaro
vegaro force-pushed the cesar/unity-wrapper-passthrough-followup branch from e10b1b2 to 2c9ab3e Compare July 29, 2026 09:08
Extends the pass-through suite in response to review feedback on #1010.

SetAppsFlyerConversionData now exercises bool, long, float and double in
addition to string/null/int/nested/list. The numeric assertions read the
value back through AsLong/AsFloat/AsDouble rather than comparing the
serialized text, because SimpleJSON routes every number through a double
field and writes it with ToString(InvariantCulture) - a float given as
9.99f serializes as 9.989999771118164. Three raw-JSON substring checks
pin the wire text the natives actually re-parse: unquoted lowercase
true/false and an un-exponentiated long.

Adds coverage for the logging and sync entry points (SetLogLevel,
SetLogHandler, SetDebugLogsEnabled, SetAllowSharingStoreAccount,
SyncPurchases, SyncAttributesAndOfferingsIfNeeded,
PresentCodeRedemptionSheet, EnableAdServicesAttributionTokenCollection),
the synchronous getters, TrackCustomPaywallImpression, and the five
AdTracker.TrackAd* methods.

The twenty string attribution setters move into a new
AttributionPassthroughTests fixture, driven by one TestCaseSource that
carries the wrapper method name, the call and the expected value on a
single entry, so a setter cannot be added to the list without also
getting asserted. SetAdjustID moves in from the old fixture.

SetProxyURL is left untested: it has no public facade, and its only call
site replaces the injected wrapper with a real one.
@vegaro
vegaro force-pushed the cesar/unity-wrapper-passthrough-followup branch from 2c9ab3e to eb80aef Compare August 6, 2026 06:59
@vegaro
vegaro marked this pull request as ready for review August 6, 2026 07:50
@vegaro
vegaro requested a review from a team as a code owner August 6, 2026 07:50
@vegaro
vegaro requested a review from rickvdl August 6, 2026 07:53
@vegaro

vegaro commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

@rickvdl mind taking a look at this 🙏

@rickvdl rickvdl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding these 🙌

Comment thread IntegrationTests/Assets/Tests/EditMode/WrapperPassthroughTests.cs Outdated
The ad-tracking and custom paywall impression pass-through tests added to
WrapperPassthroughTests already had equivalents in TrackingTests, which is
where the tracking surface is covered end to end. Removed the seven
duplicates and kept the one assertion that was only in the passthrough
file — that the wrapper receives the same CustomPaywallImpressionParams
instance the caller supplied — by folding it into the TrackingTests case
that already exercises that path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vegaro
vegaro enabled auto-merge (squash) August 28, 2026 11:11
@vegaro
vegaro merged commit 985e4be into main Aug 28, 2026
16 of 17 checks passed
@vegaro
vegaro deleted the cesar/unity-wrapper-passthrough-followup branch August 28, 2026 14:02
RCGitBot added a commit that referenced this pull request Sep 3, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* feat(singular): add setSingularDeviceID (#1062) via Guillem Corominas
(@guillemcorominas)

### 🔄 Other Changes
* Test purchase forwarding and result parsing (#1011) via Cesar de la
Vega (@vegaro)
* chore(deps): bump fastlane-plugin-revenuecat_internal from `7dd9ab9`
to `6db1da0` (#1065) via dependabot[bot] (@dependabot[bot])
* test: cover attribution, logging, and ad-tracking pass-through calls
(#1022) via Cesar de la Vega (@vegaro)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Release metadata and version string updates only; no purchase or auth
logic changes in the diff itself.
> 
> **Overview**
> **Automatic release** that publishes **9.10.0** by bumping `.version`,
both UPM `package.json` files (`com.revenuecat.purchases-unity` and
`com.revenuecat.purchases-ui-unity`), and the reported plugin version on
Android (`PLUGIN_VERSION`) and iOS (`platformFlavorVersion`).
> 
> `CHANGELOG.md` and `CHANGELOG.latest.md` are rewritten for this cut:
they drop the prior 9.9.1 dependency-update notes from “latest” and
document what ships in **9.10.0**—notably **`SetSingularDeviceID` /
Singular attribution** (#1062)—plus merged test and tooling work
(purchase forwarding/result parsing, attribution/logging/ad-tracking
pass-through tests, internal fastlane plugin bump). This PR does not add
new SDK code; it only versions and documents already-merged changes.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
379727f. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:other Changes to our CI configuration files and scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants