Skip to content

StoreKitIntegrationTests: added test to check applying a promotional offer during subscription#1588

Merged
NachoSoto merged 5 commits into
mainfrom
integration-test-promo-while-subscribed
Dec 9, 2022
Merged

StoreKitIntegrationTests: added test to check applying a promotional offer during subscription#1588
NachoSoto merged 5 commits into
mainfrom
integration-test-promo-while-subscribed

Conversation

@NachoSoto

@NachoSoto NachoSoto commented May 19, 2022

Copy link
Copy Markdown
Contributor

See iOS 15.5 release notes:

Fixed an issue so developers using StoreKit 2 can now initiate a subscription offer purchase for a product that the customer currently subscribes to. (89152302).

This adds a test to verify this behavior.

Blocked for #2020.

TODO:

@NachoSoto NachoSoto requested a review from a team May 19, 2022 17:49
Comment on lines 351 to 357

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Disabled this for now cause I want to see if it's passing now too on iOS 15.5.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@NachoSoto NachoSoto marked this pull request as draft May 19, 2022 17:49
@NachoSoto NachoSoto force-pushed the integration-test-promo-while-subscribed branch from 03cf732 to c9d75a6 Compare May 19, 2022 17:50
@NachoSoto

Copy link
Copy Markdown
Contributor Author

As expected this isn't currently passing.
I'll try with Xcode 13.4 / iOS 15.5 when it becomes available.

@aboedo aboedo 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.

let's good! we can try this again when CircleCI adds a 13.4 image

@taquitos taquitos force-pushed the integration-test-promo-while-subscribed branch from 900661a to b33fbbc Compare June 1, 2022 23:44
@taquitos

taquitos commented Jun 1, 2022

Copy link
Copy Markdown
Contributor

Note: I rebased this just now 😄

Comment thread .circleci/config.yml Outdated
install-name: iOS 15.4 Simulator
sim-device-type: iPhone-13
sim-device-runtime: iOS-15-4
sim-name: iPhone 13 (15.4)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We still need to wait for 15.5 though.

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.

Yup, without digging into it, I thought we might have it available because it's on my machine with the same version of Xcode as CircleCI.

@NachoSoto

Copy link
Copy Markdown
Contributor Author

We can use 13.4.1.

@NachoSoto NachoSoto force-pushed the integration-test-promo-while-subscribed branch from b33fbbc to 40bc0b3 Compare June 9, 2022 17:22
@NachoSoto

Copy link
Copy Markdown
Contributor Author

This still doesn't seem to be working:

Purchase did not return a transaction: Error Domain=ASDServerErrorDomain Code=3903 "The server encountered an error" UserInfo={NSLocalizedDescription=The server encountered an error}

@NachoSoto

Copy link
Copy Markdown
Contributor Author

Same failure on iOS 16 beta 1.

@taquitos taquitos closed this Jul 20, 2022
@taquitos taquitos deleted the integration-test-promo-while-subscribed branch July 20, 2022 18:23
@NachoSoto

Copy link
Copy Markdown
Contributor Author

Why close this?

@taquitos taquitos restored the integration-test-promo-while-subscribed branch July 20, 2022 21:30
@taquitos

Copy link
Copy Markdown
Contributor

Sorry, I was cleaning up some old branches and this one got caught in the cross-fire

@taquitos taquitos reopened this Jul 20, 2022
@taquitos

Copy link
Copy Markdown
Contributor

Oh, that being said, I think you can drop the config.yml changes and this should work now.

@NachoSoto

Copy link
Copy Markdown
Contributor Author

Oh, that being said, I think you can drop the config.yml changes and this should work now.

What makes you say that? I don't think they've fixed this yet, but let me try it.

@NachoSoto NachoSoto force-pushed the integration-test-promo-while-subscribed branch from 40bc0b3 to f5ffd0a Compare July 25, 2022 17:40
@NachoSoto

Copy link
Copy Markdown
Contributor Author

I thought "retest with 15.5" was "will work with 15.5", I misread it.

It should but it still doesn't hehe. I verified that locally when that came out :(

@NachoSoto NachoSoto force-pushed the integration-test-promo-while-subscribed branch from f5ffd0a to 1f9b95e Compare August 9, 2022 21:22
@NachoSoto NachoSoto added the test label Aug 9, 2022
@NachoSoto

Copy link
Copy Markdown
Contributor Author

Still not passing on iOS 16 beta 5.

@NachoSoto

Copy link
Copy Markdown
Contributor Author

I just realized this doesn't work probably for the same reason #2020 doesn't.

@NachoSoto NachoSoto requested a review from a team November 9, 2022 14:36
@NachoSoto NachoSoto force-pushed the integration-test-promo-while-subscribed branch from 1f9b95e to e5233a9 Compare December 6, 2022 02:07
@NachoSoto NachoSoto changed the base branch from main to sk2-promo-purchases December 6, 2022 02:08
@NachoSoto

Copy link
Copy Markdown
Contributor Author

This should pass when https://github.com/RevenueCat/khepri/pull/4843 is deployed too.

@NachoSoto NachoSoto changed the title [WIP] StoreKitIntegrationTests: added test to check applying a promotional offer during subscription StoreKitIntegrationTests: added test to check applying a promotional offer during subscription Dec 6, 2022
@NachoSoto NachoSoto marked this pull request as ready for review December 6, 2022 02:09
@NachoSoto NachoSoto force-pushed the sk2-promo-purchases branch 2 times, most recently from 4f4e0f8 to 24b938e Compare December 9, 2022 18:39
@NachoSoto NachoSoto force-pushed the integration-test-promo-while-subscribed branch from e5233a9 to 3657dc8 Compare December 9, 2022 21:49
@NachoSoto NachoSoto force-pushed the sk2-promo-purchases branch from 24b938e to a36c1b6 Compare December 9, 2022 21:50
@NachoSoto NachoSoto force-pushed the integration-test-promo-while-subscribed branch from 36291e2 to 4c03dd2 Compare December 9, 2022 22:00
Base automatically changed from sk2-promo-purchases to main December 9, 2022 23:04
@NachoSoto NachoSoto force-pushed the integration-test-promo-while-subscribed branch from 4c03dd2 to 5dc31f6 Compare December 9, 2022 23:08
@NachoSoto

Copy link
Copy Markdown
Contributor Author

This is passing now 🎉

@NachoSoto NachoSoto merged commit 40f5a63 into main Dec 9, 2022
@NachoSoto NachoSoto deleted the integration-test-promo-while-subscribed branch December 9, 2022 23:49
NachoSoto pushed a commit that referenced this pull request Dec 14, 2022
**This is an automatic release.**

### Bugfixes
* Un-deprecate `Purchases.configure(withAPIKey:appUserID:)` and
`Purchases.configure(withAPIKey:appUserID:observerMode:)` (#2129) via
NachoSoto (@NachoSoto)
### Other Changes
* `ReceiptFetcherTests`: refactored tests using `waitUntilValue` (#2144)
via NachoSoto (@NachoSoto)
* Added a few performance improvements for `ReceiptParser` (#2124) via
NachoSoto (@NachoSoto)
* `CallbackCache`: fixed reference (#2143) via NachoSoto (@NachoSoto)
* `PostReceiptDataOperation`: clarified receipt debug log (#2128) via
NachoSoto (@NachoSoto)
* `CallbackCache`: avoid exposing internal mutable cache (#2136) via
NachoSoto (@NachoSoto)
* `CallbackCache`: added assertion for tests to ensure we don't leak
callbacks (#2137) via NachoSoto (@NachoSoto)
* `NetworkOperation`: made `Atomic` references immutable (#2139) via
NachoSoto (@NachoSoto)
* `ReceiptParser`: ensure parsing never happens in the main thread
(#2123) via NachoSoto (@NachoSoto)
* `PostReceiptDataOperation`: also print receipt data with `verbose`
logs (#2127) via NachoSoto (@NachoSoto)
* `BasePurchasesTests`: detecting and fixing many `DeviceCache` leaks
(#2105) via NachoSoto (@NachoSoto)
* `StoreKitIntegrationTests`: added test to check applying a promotional
offer during subscription (#1588) via NachoSoto (@NachoSoto)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants