> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# subscriptions/balance/09-replay-paywall.yaml

[Source](https://github.com/leapgame/leap-sim-piano/blob/f794b594016038c483e2d20b6af56aea0ae1b982/.maestro/subscriptions/balance/09-replay-paywall.yaml)

```yaml
appId: ${APP_ID}
tags:
  - subscriptions
  - balance
---
# balance (checklist G8): the 3rd replay of the same song (`replay_paywall_threshold`, 3) opens the paywall
# on that run's result (`paywall-screen-replay`), once the result has revealed; replays 1 and 2 do not.
# Four song starts, under the default paywall's 6; no return to the list, so no home-return paywall.
#   REPLAYS: "3"
- runFlow: ../../subflows/launch-app-clean.yaml
- runFlow: ../../subflows/to-song-list.yaml
- runFlow:
    file: ../../subflows/play-mock-song.yaml
    env:
      SONG_ID: "e2e-play"
      FIRST_NOTE_DELAY_MS: "3000"

# Replays 1 and 2: no paywall on their results.
- repeat:
    times: 2
    commands:
      - extendedWaitUntil:
          visible:
            id: "session-action-replay"
          timeout: 20000
      - tapOn:
          id: "session-action-replay"
      - runFlow: ../../subflows/play-mock-notes.yaml
      - extendedWaitUntil:
          visible:
            id: "session-result-score"
          timeout: 30000
      - runFlow:
          file: ../../subflows/sleep.yaml
          env:
            MS: "8000"
      - assertNotVisible:
          id: "paywall-screen-replay"

# Replay 3: the paywall on its result.
- tapOn:
    id: "session-action-replay"
- runFlow: ../../subflows/play-mock-notes.yaml
- extendedWaitUntil:
    visible:
      id: "paywall-screen-replay"
    timeout: 30000
- tapOn:
    id: "paywall-close"
```
