For AI agents: the complete documentation index is available at ../../../llms.txt, the full documentation bundle is available at ../../../llms-full.txt, and this page is available as Markdown at ../../../quality/scripts/flows/10-adaptive-tempo-snap.md.

flows/10-adaptive-tempo-snap.yaml

Source

appId: ${APP_ID}
tags:
  - gameplay
  - adaptive-tempo
  - devtool
---
# 10 - Pause slow-down, end to end: the song freezes on the first tile (wait mode), nobody taps, and the
# adaptive-tempo policy must answer AT THAT MOMENT with an instant -0.15 (m 1.00 -> 0.85, no ramp,
# applied while the song is still stopped). Then the notes are played and the clock must stay on the
# slowed tempo.
#
# The 4-note mock chart is shorter than the policy's warm-up (2 bars / 8 notes), so the desktop side
# (scripts/e2e-adaptive-tempo-driver.ts, SCENARIO=snap) first sets a tuning through the DevTool relay
# that lifts the warm-up and the end-of-song freeze — see SNAP_E2E_TUNING in
# scripts/e2e-adaptive-tempo-steps.ts — and then asserts, from the phone's own report, that the pause
# produced `slow:pause` -> 0.85 with the live multiplier already 0.85, and that the clock follows
# after the song resumes.
#
# Needs a build with EXPO_PUBLIC_E2E=1, EXPO_PUBLIC_E2E_ADAPTIVE_TEMPO=1 and
# EXPO_PUBLIC_ENABLE_DESKTOP_TOOLS=1 (see e2e.env) and the relay on localhost:7799 — run it with
# .maestro/run-adaptive-tempo-snap.sh, not on its own (alone it passes but tests nothing).
# The flow does not assert score or stars: the first note is played late on purpose.
#
# NOTE for the agent that wrote this: it was never run by an agent (e2e is the owner's / CI's).

- runFlow:
    file: "../subflows/bootstrap-app.yaml"

- tapOn:
    id: "song-row-play-e2e-play"
- extendedWaitUntil:
    visible:
      id: "gameplay-header-pause"
    timeout: 60000

# The song freezes on the first tile and stays frozen: long enough to be a real pause (past the
# mirrored Perfect/Great zone) and for the driver to read the decision from the phone.
- extendedWaitUntil:
    visible:
      id: "no-such-element"
    timeout: 12000
    optional: true

# Play it out: C4, E4, G4 (hold), D4 — the clock runs again, now at the slowed tempo.
- tapOn:
    point: "25%,92%"
- tapOn:
    point: "45%,92%"
- longPressOn:
    point: "65%,92%"
- tapOn:
    point: "35%,92%"

- extendedWaitUntil:
    visible:
      id: "session-result-score"
    timeout: 90000