Commit Graph
29 Commits
Author SHA1 Message Date
Facundo Menzella 0858bea976 chore: Disable EventsManagerIntegrationTests till fixed (#4852)
* chore: Disable EventsManagerIntegrationTests till fixed

* disable in all testplans
2025-03-05 14:27:11 +01:00
NachoSoto 2bcd0ce328 5.0.0 changes: support SK2 by default 2024-07-01 14:37:21 -05:00
Josh Holtz b259d2f5d5 Remove unneeded tests for StoreKit2 with JWS (#3747)
### Motivation

Unlock shipping by skipping tests that are flaky unneeded tests

### Description

Removing StoreKit2JWS tests from
`BackendIntegrationTests-SK2.xctestplan`

⚠️ The functionality in `StoreKit2JWSIntegrationTests` (which is the
`usesStoreKit2JWS` dangerous setting), is not publicly available in iOS
v4. Its intention was intended only for iOS v5. These tests are safe to
skip since they have no production use.

⚠️ It _is_ important that these are not skipped for iOS v5.
2024-03-05 16:06:19 -06:00
NachoSoto d2b1c45a5b CI: split load shedder integration tests (#3675)
Follow up to #3673.

### Changes:
- Split `loadshedder-integration-tests` into `integration-tests-all` and
`loadshedder-integration-tests-v3`
- Removed `loadshedder-integration-tests` from `build_test`: this
reverts #3673. We already run loadshedder tests as part of `SK1` and
`SK2` test suites.
- Add `BackendIntegrationTests-Shedder` test plane. This isn't used by
CI (see above point), but it can be useful to run all of the load
shedder tests.
2024-02-12 10:24:24 -08:00
NachoSoto 793f4ab414 Integration Tests: split into separate jobs (#3560) 2024-01-08 12:51:33 -08:00
aboedo d1ddd6bf9c Clean up tests folders (#1402)
* moved test suites to Tests folder

* fixed outdated path

* fixed more outdated paths

* moved TestsPlans to Tests folder

* update path to Constants.swift
2022-03-21 10:26:00 -03:00
RevenueCat ReleasesandDistiller ee9cd76695 Preparing for next version (#1391)
Co-authored-by: Distiller <distiller@static.38.39.183.175.cyberlynk.net>
2022-03-14 16:01:00 -03:00
aboedo 4938fddf4a Release: 4.1.0 (#1383)
* Version bump for 4.1.0

* added some more docs

* updated changelog

* undo accidental line change

* reverted file that was accidentally updated
2022-03-14 15:48:36 -03:00
NachoSoto 17363f2bc4 Added explicit parameter name to checkTrialOrIntroDiscountEligibility for consistency (#1362)
Fixes [CF-287]
Now we have `checkTrialOrIntroDiscountEligibility(product:)` and `checkTrialOrIntroDiscountEligibility(productIdentifiers:)`

[CF-287]: https://revenuecats.atlassian.net/browse/CF-287?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2022-03-09 13:12:02 -08:00
NachoSoto 025ac5e365 Enable SwiftLint for BackendIntegrationTests (#1335)
We're also linting tests now: #1124
2022-03-04 11:39:40 -08:00
NachoSoto 7b9dea67ee IntegrationTests: added test to verify Purchases.simulatesAskToBuyInSandbox (#1330)
Finishes [sc-7662].
2022-02-25 15:58:58 -05:00
NachoSoto ae300df7e1 IntegrationTests: simplified tests using async APIs (#1332)
### Improvements:
- No more `expect(completed).toEventually(beTrue())`.
- No more `expect(error).to(beNil())`. Using `try` and `throws` tests.
- No more `expect(result).toNot(beNil())` or `XCTUnwrap`. The new APIs already return non-optional data when not failed.
- No more `toEventually`s + polling. Tests run serially now without busy waiting, which will make them faster.
- No more completion block trees, tests are linear now.

### Other changes:
- Removed empty optional `purchases(_:, shouldPurchasePromoProduct:, defermentBlock:)`.
- Using modern `==` Nimble methods.
- Removed redundant `syncPurchases` call when purchasing.
2022-02-23 18:10:33 -05:00
NachoSoto 8401614997 IntegrationTests: avoid running tests if Constants aren't set (#1333)
Without this we can get a bunch of different potentially confusing errors, instead of pointing to the source of the problem.
2022-02-22 12:16:19 -05:00
NachoSoto edb1093644 IntegrationTests: running on both SK1 and SK2 (#1329) 2022-02-22 10:06:38 -05:00
NachoSoto 8465c39f7b IntegrationTests: fail tests instead of crashing if requests fail (#1328) 2022-02-22 10:05:36 -05:00
NachoSoto 15ba4c66a2 IntegrationTests: extracted timeout constant (#1327) 2022-02-22 10:04:32 -05:00
NachoSoto b276ec1303 IntegrationTests: removed duplicated code to wait for CustomerInfo updating (#1326) 2022-02-22 10:03:51 -05:00
NachoSoto ac1982b027 IntegrationTests: removed duplicated calls to configurePurchases (#1325) 2022-02-22 07:01:06 -08:00
aboedoandJoshua Liebowitz 3b8c6adb4e Remove maybe convention for internal optionals (#1225)
* replaced maybeA, maybeB, maybeC

* replaced maybeD, maybeE

* f, g, h, i, j

* k, l, m, n, o

* o, p, q, r, s

* t, u, v, w, x, y, z

* updated style guide

* fixed some issues with naming

* fixed more issues and indents

* more and more fixes

* even more naming fixes

* fixed backend integration tests

* more naming fixes

* even more naming fixes

* fixes from previous commit

* sK2 -> sk2

* Rebase on top of backend refactor in main

* Merge fail update

* revert signing changes

* name cleanup from PR comments

Co-authored-by: Joshua Liebowitz <josh@revenuecat.com>
2022-01-31 10:48:05 -03:00
aboedo 75c421bd0b Release/4.0.0-rc.1 (#1208)
* Version bump for 4.0.0-rc.1

* updated readme to replace instances of beta with RC, and removed some outdated notes

* fix backend integration tests using outdated method

* fix backend integration tests

* removed outdated "unknown" case in promotional offer eligibility

* updated references to `paymentDiscountForProductDiscount`, added double-backticks to a couple of symbols

* updated CHANGELOG.latest.md

* updated main changelog

* updated RevenueCat-Swift.h to latest

* updated the readme to reflect the fact that the migration is done, and that we're temporarily disabling SK2
2022-01-28 13:55:46 -03:00
Josh Holtz b396037c48 Introduce new method for checking promo discount eligibility (#1222)
* Introduce new method for checking promo discoutn eligibility

* Rename to checkPromotionalOfferEligibility

* This is back going into main and replaced if let with a guard

* Added some doc

* Added new method to APITesters

* Converted bool of eligibility to an enum

* Renamed checkTrialOrIntroDiscountEligibility and checkPromotionalDiscountEligibility

* Fix some comments that weren't doc-ing the right way

* Xcodes rename help is fun

* Updated message on obsoletion

* Bundle id stuff that i didn't know i changed
2022-01-27 15:28:03 -06:00
Josh Holtz 7b05e7b153 Rename restoreTransactions to restorePurchases (#1185)
* Rename  to

* Forgot one instance of an enum with restore transactions

* Updated v4 api updates doc

* Also update objective-c
2022-01-19 12:51:07 -06:00
Josh Holtz af3ba1268a Replace SKPaymentDiscount with PromotionalOffer (#1183)
* use StoreProductDiscount instead of SKPaymentDiscount in public api

* Updated purchase in orchestrator to use package instead of string because safter

* Added some sk1 tests in purchase orachestrator

* Fixed lint

* Replace  with

* Add better platform version checks

* Fixed merge conflicts

* Docstring on promotionaloffer and rename sk1 variable

* I think i had a random letter in the tests
2022-01-18 16:33:34 -06:00
Josh Holtz 9447e09394 Rename all Configuration.storekit files with RevenueCat specific names (#1157)
* Rename all Configuration.storekit files with RevenueCat specific names

* Fix reference from backend tests

* Nope but maybe this will fix it

* Hopefully this
2022-01-11 07:43:11 -06:00
aboedoandNachoSoto 494007a8a3 Add priceFormatter to StoreProduct (#1028)
* added a price formatter for both SK1 and SK2 products

* cleanup

* more cleanup and fixed missing try

* added comments from PR suggestions

* added extra tests for different storefronts

* fixes for locale

* updated comment

* Update Purchases/Purchasing/StoreProduct.swift

Co-authored-by: NachoSoto <NachoSoto@users.noreply.github.com>

Co-authored-by: NachoSoto <NachoSoto@users.noreply.github.com>
2021-12-03 18:36:05 -03:00
aboedo 362f023bf0 rename ProductDetails -> StoreProduct (#1015)
* renamed ProductDetails -> StoreProduct

* updated a few more references to ProductDetails -> StoreProduct

* cleanup

* update reference

* clarified comment

* simplified method signatures
2021-12-02 14:03:20 -03:00
NachoSoto 7c5eafb68e Fixed consumer -> customer (#1009) 2021-11-30 13:23:34 -08:00
NachoSoto 9cb22913fa Changed several PurchaserInfo to ConsumerInfo (#1007) 2021-11-30 10:57:48 -08:00
c4d43ffdec Storekit 2: milestone 1 (#953)
* Sk2: fetch products, make purchases (#800)

* added product struct

* added Product protocol and separated wrappers for sk1 and sk2

* added price and localizedPriceString to Product

* added bridging code and first call to generic productsWithIdentifiers

* a lot of cleanup, added a couple more properties for products

* added subscription group id and cleaned up a bit

* Updated productsManager so it forwards the products calls to fetchers for sk1 and sk2

* updated a few tests and API availability checks

* updated a few methods to use productwrapper instead of skproduct

* updated tests in many places and apis

* fixed rebase issues

* fixed a few todos

* fixed a few issues caught by swiftlint

* fixed rebase issues and some visibility issues

* updated a few places to use SK2

* added horrifyingly hacky implementation for purchasing with sk2

* small cleanup, re-added method for getting SKProducts directly

* cleanup

* added caching to sk2 products fetcher

* removed trailing whitespace

* slight cleanup

* added more clarifying comments

* another cleanup

* added missing availability marks for macOS

* fixed availability marks for ProductsFetcher in ProductsManager

* yet another fix for macOS availability checks

* and more fixes for macOS version since 13.0 doesn't exist

* fixed issues in api tester

* fixed pod lib lint on non-arch64 architectures

* bundle update fastlane

* added test for dictionary += operator

* removed unnecessary method for fetching product wrappers

* cleanup file names

* updated references in StoreKitTests

* fixed targets for test file

* fixed rebase issues

* added StoreKit 2 transaction listener in the hopes of getting purchases working, unfortunately doesn't seem to work well

* fix bad refactor

* refactored, move purchasing logic to the orchestrator, added processing of results of SK 2 purchases to the orchestrator and the sk2 listener

* added arch checks in a few places to fix builds in armv7

* added another todo

* updated test for ProductsManager in StoreKit Test

* renamed `Product.swift` -> `ProductWrapper.swift`

* increased timeout for test

* added checks to ensure test compatibility with lower iOS versions

* ProductWrapper -> ProductDetails

* import Purchases -> import RevenueCat

* withProductDetailss -> withProductDetails

* productDetailss -> productDetails

* productsFromOptimalStore -> productsFromOptimalStoreKitVersion

* linting

* `Task.init {` -> `Task {`

* added comment explaining explicit cancel

* more improvements from PR comments

* `} catch let error {` -> `} catch {`

* readability improvements

* move init to the top for consistency

* extracted logging string into PurchasesString

* extracted another string

* added todo comment

* improvements from PR comments, removed redundant method

* removed unused method, more renames and improvements from PR comments

* updates xcode version for CI

* split files into StoreKit 1 and StoreKit 2 groups

* fix indentation

* fixed rebase issues

* Fix PurchaseTester project (#847)

* CheckTrialOrIntroPriceEligibility StoreKit2 support (#807)

* Sk2: fetch products, make purchases (#800)

* added product struct

* added Product protocol and separated wrappers for sk1 and sk2

* added price and localizedPriceString to Product

* added bridging code and first call to generic productsWithIdentifiers

* a lot of cleanup, added a couple more properties for products

* added subscription group id and cleaned up a bit

* Updated productsManager so it forwards the products calls to fetchers for sk1 and sk2

* updated a few tests and API availability checks

* updated a few methods to use productwrapper instead of skproduct

* updated tests in many places and apis

* fixed rebase issues

* fixed a few todos

* fixed a few issues caught by swiftlint

* fixed rebase issues and some visibility issues

* updated a few places to use SK2

* added horrifyingly hacky implementation for purchasing with sk2

* small cleanup, re-added method for getting SKProducts directly

* cleanup

* added caching to sk2 products fetcher

* removed trailing whitespace

* slight cleanup

* added more clarifying comments

* another cleanup

* added missing availability marks for macOS

* fixed availability marks for ProductsFetcher in ProductsManager

* yet another fix for macOS availability checks

* and more fixes for macOS version since 13.0 doesn't exist

* fixed issues in api tester

* fixed pod lib lint on non-arch64 architectures

* bundle update fastlane

* added test for dictionary += operator

* removed unnecessary method for fetching product wrappers

* cleanup file names

* updated references in StoreKitTests

* fixed targets for test file

* fixed rebase issues

* added StoreKit 2 transaction listener in the hopes of getting purchases working, unfortunately doesn't seem to work well

* fix bad refactor

* refactored, move purchasing logic to the orchestrator, added processing of results of SK 2 purchases to the orchestrator and the sk2 listener

* added arch checks in a few places to fix builds in armv7

* added another todo

* updated test for ProductsManager in StoreKit Test

* renamed `Product.swift` -> `ProductWrapper.swift`

* increased timeout for test

* added checks to ensure test compatibility with lower iOS versions

* ProductWrapper -> ProductDetails

* import Purchases -> import RevenueCat

* withProductDetailss -> withProductDetails

* productDetailss -> productDetails

* productsFromOptimalStore -> productsFromOptimalStoreKitVersion

* linting

* `Task.init {` -> `Task {`

* added comment explaining explicit cancel

* more improvements from PR comments

* `} catch let error {` -> `} catch {`

* readability improvements

* move init to the top for consistency

* extracted logging string into PurchasesString

* extracted another string

* added todo comment

* improvements from PR comments, removed redundant method

* removed unused method, more renames and improvements from PR comments

* updates xcode version for CI

* split files into StoreKit 1 and StoreKit 2 groups

* fix indentation

* adds check intro trial sk2 support

* fixes and renames

* removes debugging variables

* fixes and use of ProductsManager

* fix sk2Product isEligibleForIntroOffer

* remove swiftlint warning

* adds header and links to issues

* fix strings

* early return

* indentation fix

* removes maccatalyst

* fixes compilation and renames to checkEligibility

* changes on ProductsManager adding a specific sk2 function

* makes changes in TrialOrIntroPriceEligibilityChecker

* rename function to sk2ProductDetails

* some renaming

* duplicated ProductsFetcherSK1Tests.swift

* add XCTUnwrap

* revert

Co-authored-by: aboedo <andresboedo@gmail.com>

* fixed offeringsManagerTests (#856)

* Separate storekit test and backend tests (#845)

* Sk2: fetch products, make purchases (#800)

* added product struct

* added Product protocol and separated wrappers for sk1 and sk2

* added price and localizedPriceString to Product

* added bridging code and first call to generic productsWithIdentifiers

* a lot of cleanup, added a couple more properties for products

* added subscription group id and cleaned up a bit

* Updated productsManager so it forwards the products calls to fetchers for sk1 and sk2

* updated a few tests and API availability checks

* updated a few methods to use productwrapper instead of skproduct

* updated tests in many places and apis

* fixed rebase issues

* fixed a few todos

* fixed a few issues caught by swiftlint

* fixed rebase issues and some visibility issues

* updated a few places to use SK2

* added horrifyingly hacky implementation for purchasing with sk2

* small cleanup, re-added method for getting SKProducts directly

* cleanup

* added caching to sk2 products fetcher

* removed trailing whitespace

* slight cleanup

* added more clarifying comments

* another cleanup

* added missing availability marks for macOS

* fixed availability marks for ProductsFetcher in ProductsManager

* yet another fix for macOS availability checks

* and more fixes for macOS version since 13.0 doesn't exist

* fixed issues in api tester

* fixed pod lib lint on non-arch64 architectures

* bundle update fastlane

* added test for dictionary += operator

* removed unnecessary method for fetching product wrappers

* cleanup file names

* updated references in StoreKitTests

* fixed targets for test file

* fixed rebase issues

* added StoreKit 2 transaction listener in the hopes of getting purchases working, unfortunately doesn't seem to work well

* fix bad refactor

* refactored, move purchasing logic to the orchestrator, added processing of results of SK 2 purchases to the orchestrator and the sk2 listener

* added arch checks in a few places to fix builds in armv7

* added another todo

* updated test for ProductsManager in StoreKit Test

* renamed `Product.swift` -> `ProductWrapper.swift`

* increased timeout for test

* added checks to ensure test compatibility with lower iOS versions

* ProductWrapper -> ProductDetails

* import Purchases -> import RevenueCat

* withProductDetailss -> withProductDetails

* productDetailss -> productDetails

* productsFromOptimalStore -> productsFromOptimalStoreKitVersion

* linting

* `Task.init {` -> `Task {`

* added comment explaining explicit cancel

* more improvements from PR comments

* `} catch let error {` -> `} catch {`

* readability improvements

* move init to the top for consistency

* extracted logging string into PurchasesString

* extracted another string

* added todo comment

* improvements from PR comments, removed redundant method

* removed unused method, more renames and improvements from PR comments

* updates xcode version for CI

* split files into StoreKit 1 and StoreKit 2 groups

* fix indentation

* updated all references from StoreKitTests -> BackendIntegrationTests

* updated references in a few more places

* updated name of target back to StoreKitTests so the cert doesn't get updated 🙄

* fixed issues in tests

* updated arch checks for arm devices from if arm64 to if !arm, so that the code will run successfully in intel macs

* upgraded deployment target to 12.0 to fix issues when compiling StoreKit 2.
Removed arch checks.

* added separate `UnitTestsHostApp` since the `StoreKitTest` app has higher minimum deployment target than the unit tests target

* added separate scheme for unit tests to address the need of StoreKitTest

* fixed scheme name for Scanfile

* small fixes

* added skipping of test depending on OS version availability

* added pre-warming of iOS device since tests aren't starting up correctly in CI

* added pre-warming of iphone 6 and tv

* fixed devices setup since iPhone 6 is no longer available in CircleCI

* renamed StoreKitTestApp + StoreKitTests -> BackendIntegrationTests + HostApp

* more fixes to naming

* updated Nimble version, more fixes to paths

* removed host app for regular unit tests, fixed setup

* even more naming fixes, updated the scan schemes so we don't try to test appleTV for the StoreKitUnitTests

* enabled backend_integration_tests for all commits

* added missing dependency to RevenueCat framework from StoreKitUnitTests target

* fixed dependencies between targets, which would compile more targets than necessary and would have issues where the main framework would get built for the wrong platform

* update fastlane

* fixed lane name

* fixed deployment target for backend integration tests

* updated scan device OS for backend integration tests to 15.0

* fixed integration tests running wrong fastlane lane, added pre-warming devices for regular unit tests, added command line tools installation step

* removed command line tools installation step

* updated device name since iPhone SE isn't available on circleCI

* updated iPhone SE -> iPhone 8 in a couple more places

* removed pre-warming of devices, since it has been removed from Xcode 13

* removed 14.5 device from tests for now

* removed signing from backend integration tests

* fixed rebase issues

* Sk2: ProductDetails cleanup and improvements (#832)

* moved logic to wrap products into productsFetcher, added basic test to compare sk1Wrapper and sk2Wrapper

* added more checks to cover all existing properties for productWrappers

* added test to check that sk1 wrapper works correctly

* added test for SK2 product wrapper

* renamed internal method `purchase(product:` -> `purchase(sk1Product:`

* moved StoreKit2TransactionListener into corresponding group in project

* added base file for PurchaseOrchestratorTests, improved a couple of version checks for tests

* updated imports to `RevenueCat`

* re-added @available in a couple of tests

* update naming: ProductWrapper -> ProductDetails

* fix rebasing issue

* added type aliases for legacy and new skproduct, updated references to them in many places

* renamed mockSKProduct -> mockLegacySKProduct

* more cleanup

* updated naming in a few more places

* and more naming updates

* final batch of naming updates

* updated naming from new and legacy sk products to sk1 and sk2 products

* fixed naming issues with variable names that started in uppercase

* more fixes to variable names

* even more naming fixes

* final batch of naming updates, rebase fixes

* several fixes from rebase

* removed another arch check

* fixes from PR comments

* fixed missing mocks for MockProductsManager

* more "productDetailss" var renames

* removed scan_scheme env variable since we're setting it manually

* added extra test configuration for UnitTests scheme, set test ordering to random

* small ci configuration updates

* added more generous timeout for one test case

* added pre-warming of simulators

* added device pre-warming at the fastlane level

* added test plan

* added manual sleep of 5 mins to see if that fixes the testing issues

* re-added manual opening of simulators, otherwise the wait makes no sense

* made the wait for simulator bit only happen in ci

* improvement from PR comments

* fixed one reason for app crash in iOS < 15, since SceneDelegate was missing

* added check for subscriptionGroupIdentifier

* updated to use XCTSkip instead of early return in a couple of tests

* Tests for CheckTrialOrIntroductoryPriceEligibility StoreKit2 using StoreKitTests (#863)

* Storekit 2: fix tests for iOS 14.5 (#890)

* updated storage of underlyingSK2Product to use Any to prevent crashes in 14.5 devices

* added comment and small cleanup

* re-added iOS 14.5 devices to fastlane scan

* fixed rebase issues

* merge storekit_2_disable_mac_builds

* Sk2 purchase tests (#873)

* added tests skeleton, cleaned up handling of purchase sk2 package

* code clean up, added mocks to sk unit tests target, clean up tests code

* added mockStoreKit2Listener, fixed purchasesOrchestator test

* implemented missing test cases

* casted SK2Product to any for storing to prevent linking issues

* fixed more issues with linking + moved PurchasesOrchestratorTests to storekit tests

* linting

* fixed duplicate files in build phase

* fixed more issues with linking on older OS

* fixed rebase issues

* fix one test in SwiftAPITester

* updated xcode version for swift api tester

* updated api testers to use an existing bundle id to prevent code signing issues

* remove development team + undo bundle id updates

* added fastlane match readonly step

* re-add dev team

* re-add dev team to release builds for objc api tester ios

* updated certs to use fastlane match

* specified missing params for match

* fixed copy/paste issue

* `MockStoreKit2Listener` -> `MockStoreKit2TransactionListener`

* added clearing of user defaults before every test run

* added crude handling of the user cancelled case for SK2 purchases.

* fixed indentation

* updated test name to reflect what it's actually testing

* reset the value of `failTransactionsEnabled` before every test

* moved to using `resetToDefaultState`

* Removes `RequiresXcode13` (#895)

* improve pre-warming and fix flaky tests (#897)

* replaced manual pre-warming with orb

* removed appleTV from prewarming list

* removed duplicate source file

* added test timeouts

* added artificial wait before running storekit tests

* made the artificial wait run only once

* removed unnecessary param

* moved the `Self.hasWaited = true` line above, removed unnecessary parenthesis

* doubled the wait time just in case, made it a static let.

* doubled initial wait time again

* removed another instance of `wait_for_simulator:true`

* Temporarily disable sk2 purchases (#898)

* added a feature flag to disable SK2 temporarily

* fixed tests

* Show Manage Subscriptions public API (#896)

* fix rebase issue

* fixed rebase issues

* Re-enable macOS builds (#923)

* updated xcode version to 13.1.0

* re-enabled macOS builds, re-added API tester for macOS

* Merge main into storekit_2 (#930)

* Begin Refund Request (#924)

* Fix/explicit errors on tasks (#940)

* replaced `Task.init` with `_ = Task<Void, Never>`, so that if the contents of the task throw, the compiler forces us to handle the exception

* added link with explanation to the swift style guide

* Fix: storekit 2 tests on older OS versions (#951)

* removed duplicate line for devices

* fixed tests for older os versions by not storing SK2 types directly in the tests target.

* fixed copy/pasta

* merged main into sk2 (#952)

* improvements from PR comments

* more improvements from PR comments

* even more improvements from PR comments

* more improvements from PR comments

* updated to use the new lock

* removed outdated comment

* added missing cases to switch

* refactor to pass in the systemInfo to productsManager, and to reuse existing instances for intro eligiblity

* made useStoreKit2IfAvailable an instance variable instead of static

* added test cases for fetching from optimal sk with different sk version preferences

* fixed instance of the wrong method being called from overriden `setUpWithError`

* oops, fixed missing `try`

* added more detail to fatalError message when sk version can't be determined

* split tests for `TrialOrIntroPriceEligibilityChecker` into SK1 and SK2

* fix merge conflicts

Co-authored-by: Cesar de la Vega <cesarvegaro@gmail.com>
Co-authored-by: beylmk <maddie@revenuecat.com>
2021-11-22 12:37:33 -03:00