appId: ${APP_ID}
tags:
- subscriptions
- balance
---
# balance (checklist G5): pressing a VIP song (the mock catalog's `e2e-vip`) opens the paywall
# (`paywall-screen-song`); the 2nd press of a session opens the 50%-off offer
# (`sale-off-50-screen-vip_offer`), at most once a session; a new session counts again.
# Numbers checked against the arm's config by src/domain/__tests__/e2e-subscription-expectations.test.ts:
# VIP_OFFER_AFTER: "2" VIP_OFFER_PER_SESSION: "1"
- runFlow: ../../subflows/launch-app-clean.yaml
- runFlow: ../../subflows/to-song-list.yaml
- scrollUntilVisible:
element:
id: "song-row-premium-e2e-vip"
direction: DOWN
timeout: 20000
# Session 1, press 1: the paywall.
- tapOn:
id: "song-row-premium-e2e-vip"
- extendedWaitUntil:
visible:
id: "paywall-screen-song"
timeout: 30000
- tapOn:
id: "paywall-close"
- runFlow:
file: ../../subflows/sleep.yaml
env:
MS: "2000"
# Press 2: the offer.
- tapOn:
id: "song-row-premium-e2e-vip"
- extendedWaitUntil:
visible:
id: "sale-off-50-screen-vip_offer"
timeout: 30000
- assertNotVisible:
id: "paywall-cta"
- tapOn:
id: "sale-off-50-close"
- runFlow:
file: ../../subflows/sleep.yaml
env:
MS: "2000"
# Press 3: the paywall again (one offer a session).
- tapOn:
id: "song-row-premium-e2e-vip"
- extendedWaitUntil:
visible:
id: "paywall-screen-song"
timeout: 30000
- assertNotVisible:
id: "sale-off-50-close"
- tapOn:
id: "paywall-close"
# Session 2: press 1 the paywall, press 2 the offer again.
- runFlow: ../../subflows/launch-app.yaml
- runFlow: ../../subflows/to-song-list.yaml
- scrollUntilVisible:
element:
id: "song-row-premium-e2e-vip"
direction: DOWN
timeout: 20000
- tapOn:
id: "song-row-premium-e2e-vip"
- extendedWaitUntil:
visible:
id: "paywall-screen-song"
timeout: 30000
- tapOn:
id: "paywall-close"
- runFlow:
file: ../../subflows/sleep.yaml
env:
MS: "2000"
- tapOn:
id: "song-row-premium-e2e-vip"
- extendedWaitUntil:
visible:
id: "sale-off-50-screen-vip_offer"
timeout: 30000
- tapOn:
id: "sale-off-50-close"