appId: ${APP_ID}
tags:
- subscriptions
- balance
---
# balance (checklist G4): the 50%-off offer opens when the paywalls closed add up to exactly 15
# (`paywall.discount_50_after_dismissals`), and not again at 16. The paywall here is the one Profile
# opens (screen "profile"), so the offer it leads to is `sale-off-50-screen-profile`.
# Launch 1 of a clean install owes no launch paywall, so every close below is one of ours.
# Numbers checked against the arm's config by src/domain/__tests__/e2e-subscription-expectations.test.ts:
# DISMISSALS: "15"
- runFlow: ../../subflows/launch-app-clean.yaml
- runFlow: ../../subflows/to-song-list.yaml
# Closes 1 to 14: no offer after any of them.
- repeat:
times: 14
commands:
- runFlow: ../../subflows/open-profile-paywall.yaml
- extendedWaitUntil:
visible:
id: "paywall-screen-profile"
timeout: 30000
- tapOn:
id: "paywall-close"
- runFlow:
file: ../../subflows/sleep.yaml
env:
MS: "2500"
- assertNotVisible:
id: "sale-off-50-close"
# Close 15: the offer.
- runFlow: ../../subflows/open-profile-paywall.yaml
- extendedWaitUntil:
visible:
id: "paywall-screen-profile"
timeout: 30000
- tapOn:
id: "paywall-close"
- extendedWaitUntil:
visible:
id: "sale-off-50-screen-profile"
timeout: 15000
- tapOn:
id: "sale-off-50-close"
# Close 16: no offer.
- runFlow: ../../subflows/open-profile-paywall.yaml
- extendedWaitUntil:
visible:
id: "paywall-screen-profile"
timeout: 30000
- tapOn:
id: "paywall-close"
- runFlow:
file: ../../subflows/sleep.yaml
env:
MS: "4000"
- assertNotVisible:
id: "sale-off-50-close"