[UFNL] Add iOS SDK promo Thor tests - #175
Closed
sidharth-pardeshi wants to merge 51 commits into
Closed
Conversation
sidharth-pardeshi
force-pushed
the
codex/ios-upfunnel-promo-thor-tests
branch
from
June 19, 2026 19:26
ced8ba7 to
31da5d8
Compare
Collaborator
Author
|
Closing this SDK-repo PR because the simulator/E2E Thor test belongs in the native iOS app test harness instead. Replacement PR: https://github.com/Affirm/ios/pull/8683 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Upfunnel-owned promo messaging UI coverage for the iOS merchant SDK example app.
Examples/ExamplesUITests/UpfunnelPromoMessagingwith an UpfunnelOWNERSfileUpfunnelPromoMessagingThorUITests, which launches the example app through the real iOS SDK and points promo calls at a Thor host when Thor inputs are suppliedpromosURLOverrideimplementation hook used only by the example app category, avoiding new public SDK API surfacepromo_external_idthrough the example app into the SDK promo request pathtools/buildkite/create_upfunnel_promo_thor_merchant.py, which creates and verifies real Upfunnel merchant/template data on the Thor using all-the-things test-framework helperstools/buildkite/run_upfunnel_promo_thor_uitest.sh, which runs the Thor simulator test and keeps an.xcresultbundle with screenshotstools/buildkite/upfunnel_promo_thor_tests.yaml, which provisions a live US Thor and creates the Thor merchant before dispatching the iOS simulator test.github/workflows/ui-tests.ymlso Buildkite can dispatch the Thor-specific UI test on GitHub Actions macOS and upload the.xcresultartifactExamplesUITestsopt-in viaAFFIRM_RUN_SANDBOX_UI_TESTSso normal CI no longer depends on live sandbox promo behaviorReal Thor Contract
The Thor path does not use canned promo responses. The setup script:
https://<thor-id>.affirm-thor.comUpfunnelAPI.get_upfunnelThe SDK test then launches the example app and lets the SDK issue its normal
/api/promos/v2/<public_key>request against the Thor host, includingpromo_external_id.Thor Inputs
AFFIRM_PROMO_BASE_URL=https://<thor-id>.affirm-thor.com, or Buildkite metadatathor-id-us-liveAFFIRM_PUBLIC_KEY=<merchant public key created on Thor>, or Buildkite metadataupfunnel-sdk-promo-messaging-public-keyAFFIRM_PROMO_EXTERNAL_ID, defaulting to setup metadata ortest_external_idAFFIRM_EXPECTED_PROMO_TEXT, defaulting to the setup script's live Upfunnel ALA metadataUSA/en_US/USDWithout the Thor URL/public key, the Thor UI test skips so the repo's existing GitHub Actions can still run.
Validation
git diff --checkbash -n tools/buildkite/run_upfunnel_promo_thor_uitest.shpython3 -m py_compile tools/buildkite/create_upfunnel_promo_thor_merchant.py tools/buildkite/dispatch_upfunnel_promo_thor_uitest.py.github/workflows/ui-tests.ymlandtools/buildkite/upfunnel_promo_thor_tests.yamlwith PyYAMLRun TestsandRun UITestspassed before the latest CI-wiring commit; the latest rerun is in progressxcodebuild; local machine has only Command Line Tools and no full Xcode, so local simulator verification was not availableCI Notes
The companion Terraffirm pipeline registration is in Affirm/terraffirm#23676. Once applied, that PR should create the Buildkite PR check that uploads
tools/buildkite/upfunnel_promo_thor_tests.yamlfrom this SDK branch. The current iOS runner still dispatches the simulator step to GitHub Actions macOS after Thor setup, so that execution path remains part of the CI Platform review.