* Reduce flakiness of test
Recent failure: https://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/32195/workflows/fda6c174-617d-44bd-a997-ad2a9a36de4d/jobs/421143/tests
* Try this for maestro flaky tests
* TEMP: Maestro tests only workflow
* Try workaround for failure-to-sync StoreKit after removing transactions from SKTestSession
Trying to reduce the flakiness of failed tests in https://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/32195/workflows/fda6c174-617d-44bd-a997-ad2a9a36de4d/jobs/421143/tests (`testDoesNotSyncExistingSK2Purchases()` and `testObservingTransactionUnlocksEntitlement()`)
* Revert "TEMP: Maestro tests only workflow"
This reverts commit 040446a754.
* TEMP: for testing flaky tests of this branch
* Add log from StoreKitIntegrationTests when purchasing a product to identify the transaction id and the source of that purchase
This could help debugging flaky tests as sometimes we get a "Finishing transaction" log in a test that is actually finishing the transaction generated in a different test
* Fix OS version compatibility
* Fix compilation
* try this
* Fix lint
* Improve flakiness of `PurchasesFallbackURLBackendStoreKit2IntegrationTests`' `testPostsPurchasePerformedOnFallbackURLWhenRecoveringAfterRestartToMainServer()`
By asserting the Finishing transaction log only against the actual expected transaction
* Reduce flakiness of `OfflineStoreKit1IntegrationTests`' `testPurchasingMultipleProductsWhileServerIsDownHandlesAllTransactionsWhenForegroundingApp()`
* Revert "TEMP: for testing flaky tests of this branch"
This reverts commit c11e904a18.
* Simplification
* Fix lint
* Improve logs of external SK purchases made in tests
* Revert "Try workaround for failure-to-sync StoreKit after removing transactions from SKTestSession"
This reverts commit eab98f696c.
# Conflicts:
# Tests/StoreKitUnitTests/TestHelpers/StoreKitTestHelpers.swift
* Apply suggestions from code review
Co-authored-by: Toni Rico <toni.rico.diez@revenuecat.com>
* Remove unnecessary prints
---------
Co-authored-by: Toni Rico <toni.rico.diez@revenuecat.com>
* Add Maestro E2E test
* Add confirm purchase flow
* Fix
* Add some documentation to maestro e2e tests flows
* Remove comment
* Add missing case for error message
* Add missing `fallback` environment to All CI backend integration test plan
* Remove comment
* Remove `production_test_store` from Slack message environment for `BackendIntegrationTests-All-CI`
* Make `store` a separate parameter for Maestro E2E tests
* Improve naming
* Do not configure StoreKit config file for test store
* Code cleanup
* More cleanup
* Temp for testing
* Fix context
* Fix temp for testing
* Revert temporal changes for quick testing
* Remove leftover `production_test_store` from fastfile
* Move the setup_xcconfig logic from circleCI config to Fastfile, added assertions on entitlement active and backend source
* Implemented StoreKit config file watcher in Fastlane in order to support clean installing app and re-installing SK config file on the fly
* Exposing expected verification result and customer info source to assert on in Maestro
* Implemented PR feedback
* Implemented PR feedback
* Testing maestro e2e
* Testing e2e
* Testing e2e
* Testing e2e
* Testing e2e
* Testing e2e
* Testing e2e
* Implemented Fastlane action for installing the right StoreKit config file to the simulator that will be used for maestro testing
* Made the setup simulator storekit config action a lot more stable by updating the code finding the storekit shared app group container
* Added script for generating CI.xcconfig file to be used by the CI runs
* Updated config.yml
* Updated maestro flows path
* Made the e2e test lane reusable with a test_environment argument, added storekit config file for load shedder. Setup CircleCI job for all 3 test_environments
* Fix passing load shedder api key to command
* Updated storing of test output
* Added test environment name to the e2e test runs
* Restore missing install_dependencies call
* Also store test output as artifacts
* Allow setting force_server_error_strategy from env variable, using it in the fallback e2e tests.
* Using CircleCI matrix for test_environments
* Added support for showing different E2E flows in the app depending on which maestro flow is run to avoid tests breaking if changes are made
* Using new automated sdk project. Using a single test flow and the environment is now soley based on API key and server error strategy environment variables
* Updated context and environment variables for e2e tests
* Only generate maestro workspace
* Test
* Fixed incorrect env variables being used
* Fix formatting
* Simplified env var -> xcconfig logic to avoid using wrong values
* Fix config
* Updated maestro screenshot names
* Fixed forceServerErrorStrategy
* Reusing maestro e2e test all environments
* Added fortress 2 as load_shedder_secondary test environment
* Rename test_environment to backend_environment
* use default value for force_server_error_strategy
* Updated flow names
* Added daily e2e test schedule
* Removed unused parameter
* Revert to original build and test step after testing
* Passing the api_host to the maestro test app for the load shedder backends, using the normal API key
* Renamed load_shedder_primary and load_shedder_secondary
* Renamed forceServerErrorStrategy case and removed protocl from api_host
* Small code changes
* Rename parameter target to query to align with Tuist terminology
* Small code changes to address PR feedback
* Do not update SampleCat in `update_swift_package_commit` lane
* Change Dependency Rule of purchases-ios in SampleCat to use Up to Next Major Version, set to 5.44.0 (latest release as of now)
* Replace SDK version number in Sample Cat
* tuist: use already-defined `xcconfigFileConfigurations` `Configuration` array
* tuist: rename `project` to `app` (tuist's `Settings` object). Use `.app` or `.framework` throughout the projects in the repo
* rename settings constants
* chore: Remove project warnings from examples
* remove extra file
* remove run from RevneueCat and add xctestplans to workspace
* Add build configurations for project
* revert maestro
* remove storyboard
* don't add local xcconfig if not there
* remove additional files - only in workspace
* hide paywall tester scheme
* Add APITester tag
* add BackendIntegrationTestsHostApp
* fixed api testers
* Initial app creation
* Initial screen
* Installs and configures the SDK
* Creates a full Swift 6 compliant ViewModel
* Adds a demo customer center button
* Fixes icon name
* Updates a bit of the logic to fetch offerings
* Updates initial layout by showing offerings
* Makes more progress with a VERY DRAFT and VERY WIP screen
* Creates a new network path and requests
* Creates a new health API and adds it to the BE class
* Creates a `checkOfferings` method
* Pushes local changes
* Moved viewmodels to separate files
* Prepared some basic UI structure
* Adds specific branch of `purchases-ios` for testing
* Gets the sample app back to compiling
* Shows products
* Initial implementation of the products view
* More progress
* More changes
* Added first illustrations
* Added noise background and visual to offerings
* Presenting Product on tap
* made more progress on sample
* Removed NavBar
* Fetches offerings with the latest changes to the SDK
* Adds offerings view
* Maps packages into offering
* Updates app so that we can show a list of the packages that belong to an offering
* Moves all logic to a dedicated health view model
* Adds a full-screen blocking error to the app
* More slight adjustments
* Adds a way to purchase products directly from the Sample App
* Adds an empty StoreKit Configuration file to the scheme
* Changes bundle id
* Only allow scroll behaviour to bounce where it makes sense
* Bit of a better layout for the full screen error
* Points RC Swift Package back to the `main` branch
* Re-adds error messages to make sure that we can just point the user in the right direction
* Updates product cell to have better styles and test purchase button
* Updates `ProductCell` to make sure purchased products can be shown
* Removes unnecessary files from PR
* Formats files
* Removes warning
* Adds project to the API checker script
* Adds project to the update revision fastlane script
* Updates error view
* Removes storekit config file temporarily
* Updates name of property to match dashboard
* Updates entitlementId name
* Adds storekit file back to the scheme (this will get injected from the BE)
* Optimizes app icon to reduce repo size
* Reduces app icon file
* Remove instead of comment out
* Removes unused `EntitlementsView`
* Removes duplicate
* Removes all headers from Swift files
* Uses string directly rather than property holding single string
* canNot to cannot
* Renames products to packages
* Refactors logic to tidy up a bit
* Moves types over to their own files
* More tidying up
* Renames properties from sdk to loaded
* Removes previews that do not work
* Renames `purchasable` to `viewModel`
* Fixes sendability issues
* Converts folders to groups instead
---------
Co-authored-by: Hidde van der Ploeg <hiddevanderploeg@me.com>
* feat: Show multiple subscriptions instead of one
* tweak screen
* tweak manage sub
* tweak button actions
* add warning
* add warning
* point to branch
* fixed compiler errors
* push nav
* open wihtout selection
* listen to array changes
* bring back filter
* listen to array changes
* remove close
* go back to list
* brought back snaps
* add snaps for warning
* reuse view model for both screens
* push tuist branch
* test compile again
* fixed wrong initializer
* trailing commas
* remove trailing comma
* almost done with tests
* remove key
* revert a rfew things
* revert ManageSubscriptionsButtonsView
* lint
* missing broken test
* fixed last tests
* move transaction code to transaction.swift
* useful renaming
* rename variables, and rewrite guard
* add test for non apple
* re-add onchange
* added support
* shouldShowContactSupport
* remove dup close
* rever tuist branc
* add missing copies
* fixed condition
* tests working
* remove state
* tweaked snaps
* trailing comma
* disable dup warning till backend is ready
* trailing comma
* fix old sna
* fix: Hide cancel & refundRequest if subscription is already cancelled
* update refund
* convert to ObservedObject
* Update RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift
Co-authored-by: Antonio Pallares <ajpallares@users.noreply.github.com>
* test binding
* use binding to update
* EntitlementInfo.isCancelled
* remove extra binding and private(set)
* remove extra
* fixed tests
---------
Co-authored-by: Antonio Pallares <ajpallares@users.noreply.github.com>
* add rc-maestro with tests
* point to remote
* add promo-offer-primary-button
* move mise.toml to root
* added change plans test
* follow spm conventions + remove test files
* add manage_subscriptions test
* add see all purchases test
* added xccondig
* renamed to Local.xcconfig instead of Maestro.xcconfig
* renamed
* deleted Derived folder
* delete .swiftpm/xcode/xcshareddata/xcschemes/RevenueCat-Package.xcscheme
* feat: Add circle CI job
* test mise x
* bring back path
* generate all in one
* install + generate
* replce api key
* install dep
* fix crash when trying to access invalid URL from paywall components localization (#5016)
* dont override default xcconfig
* updated fastlane
* fixed ci
* tuist
* fixed fastlane lane
* mastro path
* added cleanup job
* final tweaks
* dont launch app all the time
* increase timeout
* fastlane exports
* replace assertion
* test instead of record
* test using maestro sim cmd
* use it in fastlane
* pass it to fastlane as option
* install runtime 17
* add env
* use default if not passed
* remove arch
* remove arch
* test existing sim 18.2
* don't install 17
* wrap in sh
* record flow
* accept promo offer
* deleted CI code
---------
Co-authored-by: Antonio Pallares <ajpallares@users.noreply.github.com>