Files
opencode-mobile/.maestro/flows/activation-positive.yaml
Den 6a9bb6d2d5 fix(ci): make activation-e2e harness actually run its flows (#91)
Port the harness fixes from test/e2e-new-features to main so the
Activation E2E workflow stops failing before any flow executes:

- Run everything through scripts/run-e2e-flows.sh as a single script
  invocation: android-emulator-runner executes each 'script:' line in
  its own shell, so the previous 'cd artifacts/screenshots' never
  persisted and maestro failed with 'Flow path does not exist' on
  every run (19/19 red since the workflow landed).
- adb reverse + 127.0.0.1 instead of 10.0.2.2 (unreliable headless),
  emulator->mock reachability probe, logcat + maestro debug capture.
- Trim the flow list to the two flows that exist on main; the three
  newer flows land with the test/e2e-new-features PR.
- continue-on-error until the suite's first green: the positive flow
  still fails its final reply assertion (mode B in #90), and a
  never-green suite should not block unrelated PRs or pollute the
  product-intelligence failure metrics (#89).

Refs #90. Refs #89.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 23:31:01 -07:00

87 lines
2.9 KiB
YAML

appId: cc.agentlabs.opencode
name: Activation - positive path (consent -> connect -> send -> reply)
---
# Positive activation flow: first launch -> telemetry consent -> quick connect
# to the mock opencode server (tests/fixtures/mock-opencode-server.ts, run
# normally on the port below) -> connected indicator -> new session -> send a
# message -> assert the streamed canned reply renders.
#
# The CI job starts `node tests/fixtures/mock-opencode-server.ts --port 4096`
# on the runner host BEFORE this flow runs. The Android emulator reaches the
# runner host via the standard emulator alias 127.0.0.1.
- launchApp:
clearState: true
- takeScreenshot: positive-S1_launch_consent_modal
- assertVisible:
id: "telemetry-consent-card"
- tapOn:
id: "telemetry-decline-button"
- assertVisible:
text: "No Connection"
- takeScreenshot: positive-S2_empty_state
- tapOn:
id: "add-connection-button"
- assertVisible:
id: "connect-ip-input"
- takeScreenshot: positive-S3_add_connection_form
- tapOn:
id: "connect-ip-input"
- inputText: "127.0.0.1:4096"
- hideKeyboard
- takeScreenshot: positive-S4_server_url_entered
- tapOn:
id: "connect-submit-button"
# Quick Connect fires up to 3 sequential/parallel network calls before the
# dot renders (testConnection's health(), then addConnection's parallel
# project.current() + path.get()), and each individual fetch is capped by
# src/lib/sdk.ts REQUEST_TIMEOUT_MS = 30_000. A 20s wait here raced that
# 30s client-side timeout and flaked in CI (first real run, #82) even
# though the mock server was up and reachable. 40s gives the app's own
# timeout room to complete; this still asserts the real thing, just with a
# wait that isn't shorter than the code path it's waiting on.
- extendedWaitUntil:
visible:
id: "connection-status-dot"
timeout: 40000
- assertVisible:
id: "connection-status-dot"
- takeScreenshot: positive-S5_connected
- tapOn:
id: "new-session-fab"
- extendedWaitUntil:
visible:
id: "chat-message-input"
timeout: 15000
- takeScreenshot: positive-S6_session_opened
- tapOn:
id: "chat-message-input"
- inputText: "Hello from the activation e2e test"
- hideKeyboard
- takeScreenshot: positive-S7_message_typed
- tapOn:
id: "chat-send-button"
- extendedWaitUntil:
visible:
text: "Hello from the mock opencode server"
timeout: 20000
- assertVisible:
id: "chat-bubble-assistant"
- assertVisible:
text: "Hello from the mock opencode server"
# The USER's message must still be in the transcript after the reply lands.
# Regression guard: any message.updated event strips optimistic temp-
# messages (src/stores/sessions.ts handleEvent), so if the server never
# persisted/broadcast the user's message, it would vanish here.
- assertVisible:
id: "chat-bubble-user"
- assertVisible:
text: "Hello from the activation e2e test"
- takeScreenshot: positive-S8_reply_received