Skip to content

Issue in UITests with current offerings property. #2193

Description

@jesus-mg-ios

Describe the bug
We are using the current property from offerings to get the required purchase offer from the Product team.
This is a great feature given by revenuecat because you don't need to know the identifier associated with the product.

But when you land to tests with storekit tests, if the configuration doesn't match with the configuration (offerings and packages) in revenuecat, the current offer property is not filled.

  1. Environment
    1. Platform: iOS
    2. SDK version: 4.15.x
    3. StoreKit 2 (disabled with useStoreKit2IfEnabled(false)) (Y/N): N
    4. OS version: 16.x
    5. Xcode version: 14.1.0
    6. How widespread is the issue. Percentage of devices affected: No users, because it's only on UI tests.
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior (described above)
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Additional context
Maybe there's any way to fill the current offer for tests.

 Purchases.shared.getOfferings { offerings, error in
    ...

   print(offerings?.current) // Nil
   ...
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions