appId: ${APP_ID}
---
# On a paywall that is open: the live store prices have loaded, then the trial is (or is not) promised.
# ${TRIAL_PATTERN} the text the paywall shows when its package carries the 3-day trial
# ${EXPECT_TRIAL} "1" it must be on screen, anything else it must not be
# The wait for a price comes first so "no trial" is read from a loaded paywall, not from one still
# loading (the loading state shows no price line at all). The e2e IAP backend (e2e-iap-service.ts) sells
# the trial from its `default` offering only, so this tells which offering the running arm asked for.
- extendedWaitUntil:
visible:
id: "paywall-cta"
timeout: 30000
- extendedWaitUntil:
visible: ".*(4\\.99|39\\.99).*"
timeout: 30000
- runFlow:
when:
true: ${EXPECT_TRIAL == '1'}
commands:
- assertVisible: ${TRIAL_PATTERN}
- runFlow:
when:
true: ${EXPECT_TRIAL != '1'}
commands:
- assertNotVisible: ${TRIAL_PATTERN}