# Phase 4 Stage 2 — anonymous onboarding path:
#   Splash → onboarding carousel → Welcome → Display Name → Verif Choice Sheet
#   (curhat anonim) → ESP → USP → arrival at /payment/method-pick (Stage 3
#   owns the screen body; this flow stops at route arrival).
#
# Run:
#   maestro test client_app/.maestro/flows/03_onboarding_anon.yaml
#
# Pre-reqs: same as 02_onboarding_verified.yaml.
#
# NOTE: numeric prefix conflicts with the existing 03_payment_to_chat_happy.yaml
# — Stage 9 will reorganize the flow directory once the full Phase 4 suite lands.
appId: com.halobestie.client.client_app
---
- launchApp:
    clearState: true
- extendedWaitUntil:
    visible:
      text: "Mulai"
    timeout: 15000
- tapOn:
    text: "Mulai"
    retryTapIfNoChange: true
- extendedWaitUntil:
    visible:
      text: "Lanjut sebagai Tamu"
    timeout: 10000
- tapOn:
    text: "Lanjut sebagai Tamu"
    retryTapIfNoChange: true
- extendedWaitUntil:
    visible:
      text: "Nama panggilan"
    timeout: 10000
- tapOn:
    text: "Nama panggilan"
- inputText: "Maestro"
- hideKeyboard
- tapOn:
    text: "lanjut"
    retryTapIfNoChange: true
# Verif Choice Sheet — pick anonymous branch
- extendedWaitUntil:
    visible:
      text: "curhat anonim"
    timeout: 10000
- tapOn:
    text: "curhat anonim"
    retryTapIfNoChange: true
# ESP screen — leave empty + tap lewati to exercise the skip path
- extendedWaitUntil:
    visible:
      text: "Lagi mikirin apa?"
    timeout: 10000
- tapOn:
    text: "lewati"
    retryTapIfNoChange: true
# USP screen
- extendedWaitUntil:
    visible:
      text: "Sebelum mulai"
    timeout: 10000
- tapOn:
    text: "aku ngerti, lanjut"
    retryTapIfNoChange: true
# Stage 3 owns /payment/method-pick — arrival is the success signal.
- extendedWaitUntil:
    notVisible:
      text: "Sebelum mulai"
    timeout: 10000
- extendedWaitUntil:
    visible:
      text: "Pilih cara curhat"
    timeout: 10000
    optional: true
