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/subflows/shop-screen.md.

subflows/shop-screen.yaml

Source

appId: ${APP_ID}
---
# The Shop of an arm that has one (`shop.enabled`): its premium card and its No Ads packs.
#   ${EXPECT_TRIAL_TEXT}  "1": the card promises "3-Day Free Trial"; anything else: it does not (`shop.trialText`)
#   ${DAY_ID} ${DAY_PRICE}            the 1-day pack of the arm's tier (`noads.tier`): product id, price regex
#   ${LIFETIME_ID} ${LIFETIME_PRICE}  the lifetime pack of that tier
# Each value is checked against the arm's real config (src/data/__tests__/e2e-monetization-flows.test.ts).
- runFlow: launch-app-clean.yaml
- runFlow: to-song-list.yaml
- tapOn:
    id: "tab-button-shop"
- extendedWaitUntil:
    visible:
      id: "shop-screen"
    timeout: 30000
- extendedWaitUntil:
    visible:
      id: "shop-try-free"
    timeout: 30000
- runFlow:
    when:
      true: ${EXPECT_TRIAL_TEXT == '1'}
    commands:
      - assertVisible: ".*3-Day Free Trial.*"
- runFlow:
    when:
      true: ${EXPECT_TRIAL_TEXT != '1'}
    commands:
      - assertNotVisible: ".*3-Day Free Trial.*"
# The tier's packs, by product id, each with its price.
- extendedWaitUntil:
    visible:
      id: "shop-pack-${LIFETIME_ID}"
    timeout: 30000
# The cards fade in one after another (FadeInUp with growing delays): wait for each, never assert at once.
- extendedWaitUntil:
    visible:
      id: "shop-pack-${LIFETIME_ID}"
      text: ${LIFETIME_PRICE}
    timeout: 10000
- extendedWaitUntil:
    visible:
      id: "shop-pack-${DAY_ID}"
      text: ${DAY_PRICE}
    timeout: 10000
# "See All Plans" opens the subscription paywall; close it again.
- tapOn:
    id: "shop-see-plans"
- extendedWaitUntil:
    visible:
      id: "paywall-close"
    timeout: 30000
- tapOn:
    id: "paywall-close"
- extendedWaitUntil:
    visible:
      id: "shop-screen"
    timeout: 15000