# Stage 5 acceptance: drive the searching screen into the 5-min timeout # state without waiting 5 minutes, verify the new copy + both CTAs render. # # Flow: # home → tap CTA → payment funnel → confirm → /chat/searching → # force-timeout via dev endpoint → verify timeout panel + CTAs. # # Pre-req: # 1. Customer is already onboarded + on /home (run flow 01 first). # 2. At least one mitra is ONLINE on the target backend (so the home # "Mulai Curhat" CTA is enabled — we then force-timeout server-side # regardless of mitra availability). # 3. Backend reachable at BACKEND_INTERNAL_URL with NODE_ENV != 'production' # (so the _test routes register). # # Run: # maestro test client_app/.maestro/flows/05_searching_timeout.yaml appId: ${APP_ID_ANDROID} env: BACKEND_INTERNAL_URL: http://localhost:3001 --- - launchApp: clearState: false - assertVisible: "Mulai Curhat" # Step 1: enter payment funnel. - tapOn: "Mulai Curhat" - extendedWaitUntil: visible: text: "pilih cara curhat|sesi pertama|pilih durasi" timeout: 10000 # Step 2: regardless of branch, end up on /payment/method. - runFlow: when: visible: text: "pilih cara curhat" commands: - tapOn: "chat" - extendedWaitUntil: visible: text: "pilih durasi" timeout: 5000 - tapOn: text: "5 menit" retryTapIfNoChange: true - tapOn: text: "bayar" retryTapIfNoChange: true - runFlow: when: visible: text: "sesi pertama" commands: - tapOn: text: "mulai" retryTapIfNoChange: true # Step 3: cara-bayar → tap bayar → waiting screen. - extendedWaitUntil: visible: text: "cara bayar" timeout: 10000 - tapOn: text: "bayar" retryTapIfNoChange: true # Step 4: payment confirms via mock; the searching screen opens. The # soft-prompt copy ships in Stage 5 — we wait for that landmark. - extendedWaitUntil: visible: text: "sambil nunggu" timeout: 15000 - assertVisible: "lagi nyari bestie..." # Step 5: force the 5-min timeout server-side; the WS event lands within # ~1s and the screen flips to the timeout panel. - runScript: file: ../scripts/force_pairing_timeout.js env: BACKEND_INTERNAL_URL: ${BACKEND_INTERNAL_URL} # Step 6: verify timeout panel + both CTAs render. - extendedWaitUntil: visible: text: "masih nyari nih" timeout: 10000 - assertVisible: "coba cari lagi" - assertVisible: "kembali ke home"