For AI agents: the complete documentation index is available at ../../../../llms.txt, the full documentation bundle is available at ../../../../llms-full.txt, and this page is available as Markdown at ../../../../quality/scripts/subscriptions/balance/04-launch-offers.md.

subscriptions/balance/04-launch-offers.yaml

Source

appId: ${APP_ID}
tags:
  - subscriptions
  - balance
---
# balance (checklist G1–G3): what each cold launch owes. Launch 1 (a clean install past the first run)
# owes nothing; launch 2 the subscription paywall; launch 3 the 50%-off offer in its place
# (`paywall.discount_50_from_session` 3, once for life); launch 4 the subscription paywall again.
# The paywall on screen names what opened it: `paywall-screen-session`, `sale-off-50-screen-session`.
# Numbers checked against the arm's config by src/domain/__tests__/e2e-subscription-expectations.test.ts:
#   LAUNCH_FROM: "2"  DISCOUNT_FROM: "3"
- runFlow: ../../subflows/launch-app-clean.yaml
- extendedWaitUntil:
    visible:
      id: "songs-search-input"
    timeout: 120000
- runFlow:
    file: ../../subflows/sleep.yaml
    env:
      MS: "15000"
- assertNotVisible:
    id: "paywall-cta"
- assertNotVisible:
    id: "sale-off-50-close"

# Launch 2: the subscription paywall.
- runFlow: ../../subflows/launch-app.yaml
- extendedWaitUntil:
    visible:
      id: "paywall-screen-session"
    timeout: 60000
- assertNotVisible:
    id: "sale-off-50-close"
- tapOn:
    id: "paywall-close"

# Launch 3: the 50%-off offer instead.
- runFlow: ../../subflows/launch-app.yaml
- extendedWaitUntil:
    visible:
      id: "sale-off-50-screen-session"
    timeout: 60000
- assertNotVisible:
    id: "paywall-cta"
- tapOn:
    id: "sale-off-50-close"

# Launch 4: the subscription paywall again, no offer.
- runFlow: ../../subflows/launch-app.yaml
- extendedWaitUntil:
    visible:
      id: "paywall-screen-session"
    timeout: 60000
- assertNotVisible:
    id: "sale-off-50-close"
- tapOn:
    id: "paywall-close"