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

# subflows/play-mock-song.yaml

[Source](https://github.com/leapgame/leap-sim-piano/blob/f794b594016038c483e2d20b6af56aea0ae1b982/.maestro/subflows/play-mock-song.yaml)

```yaml
appId: ${APP_ID}
---
# Plays the mock song for real, from the song list to the result screen:
#   ${SONG_ID}  catalog id of a mock song (e2e-play | e2e-hard), both on the same chart
#   ${FIRST_NOTE_DELAY_MS}  how long to wait before the first tap (default 3000)
#
# The chart (src/core/e2e/e2e-mock-catalog.pure.ts, 60 BPM): C4 single, E4 single, G4 HOLD (2 s), D4 single.
# The game WAITS on the hit line for each tile (auto-pause), and a tap within 2 s of the tile
# freezing there scores Perfect+, so no clock sync is needed: the first tile reaches the line ~2.3 s
# after the pause button shows, and every following tile 2 s after the previous tap or hold ends;
# Maestro's own tap overhead (~2.3 s) lands each tap inside that window. A clean run is
# 4 x Perfect+ plus the hold bonus = score 58, 3 stars.
#
# Keys: the keyboard fills the (landscape) screen height, 10 white keys A3..C5 at 5%, 15% ... 95%
# of the width; the white key faces sit at ~92% of the height (away from the black keys).
- tapOn:
    id: "song-row-play-${SONG_ID}"
- extendedWaitUntil:
    visible:
      id: "gameplay-header-pause"
    timeout: 60000

# Let the first tile arrive (a wait that always runs its full time: nothing named this is on screen).
- extendedWaitUntil:
    visible:
      id: "no-such-element"
    timeout: ${FIRST_NOTE_DELAY_MS}
    optional: true

# A wrong key does nothing: the tile stays frozen on the line, the score stays 0.
- tapOn:
    point: "75%,92%"

# Note 1, C4 (single) -> note 2, E4 (single) -> note 3, G4 (hold: press and keep holding) -> note 4, D4 (single).
- tapOn:
    point: "25%,92%"
- tapOn:
    point: "45%,92%"
- longPressOn:
    point: "65%,92%"
- tapOn:
    point: "35%,92%"

# The song ends on its last note: the result screen.
- extendedWaitUntil:
    visible:
      id: "session-result-score"
    timeout: 60000
```
