chahinebrini 417191c90a test(maestro): 6 E2E flows + setup-guide + testID-TODO
User-runnable lokal via maestro CLI oder Studio (GUI). Ahmed-agent built.

Neue flows (.maestro/):
- auth/email-signin.yaml (admin@rebreak.org login via env-vars, NOT hardcoded)
- profile/view-and-edit.yaml (avatar tap → edit → save → verify)
- profile/demographics.yaml (accordion → fill 3 fields → verify save)
- settings/dark-theme.yaml (Settings → Theme → Dark → verify)
- urge/sos-flow.yaml (start SOS → atemübung → finish → rating)
- community/create-post.yaml (compose → publish)

SETUP.md ergänzt: install, prerequisites, env-vars, troubleshooting.

TODO_TESTIDS.md (17 missing testIDs, 7 high-prio):
- AppHeader: header-avatar-btn (alle flows betroffen, aktuell coordinate-fallback)
- urge: sos-send-btn (SOS-flow blocked ohne)
- profile/edit: nickname-input, save-btn

GH-Actions template (.github/workflows/maestro-cloud.yml) — NICHT aktiv,
braucht User-OK + EAS-secrets.

User runs:
  maestro test apps/rebreak-native/.maestro/auth/email-signin.yaml \
    --env=E2E_TEST_USER=admin --env=E2E_TEST_PASSWORD=<from Infisical>
  maestro studio  # GUI

Stolperfalle: charioanouar (Google OAuth) funktioniert nicht — admin-account
nutzen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 15:45:53 +02:00

73 lines
2.0 KiB
YAML

# community/create-post.yaml
# Tests: Login → Home-Feed → ComposeCard → type text → publish → ComposeCard resets.
# Pre-requisite: App installed. Test-user exists on staging.
# Env-Vars: E2E_TEST_USER, E2E_TEST_PASSWORD
# Expected outcome: After tapping "Teilen", ComposeCard resets to idle state
# (placeholder text visible again). Post is created in staging DB.
#
# NOTE: This flow creates a real post on staging. No automatic cleanup.
# Delete via Service-Role or Supabase dashboard after test runs.
#
# ComposeCard placeholder = t('community.compose_placeholder') = "Was bewegt dich gerade?" (de.json)
# Share button = t('community.share') = "Teilen" (de.json)
appId: org.rebreak.app
---
- launchApp:
clearState: true
- waitForAnimationToEnd:
timeout: 5000
# --- Auth ---
- assertVisible:
text: "E-Mail"
- tapOn:
text: "E-Mail"
- inputText: ${E2E_TEST_USER}@rebreak.internal
- tapOn:
text: "Passwort"
- inputText: ${E2E_TEST_PASSWORD}
- tapOn:
text: "Anmelden"
- waitForAnimationToEnd:
timeout: 10000
# --- Home-Feed ---
- assertVisible:
text: "ReBreak"
# ComposeCard sits at top of Home feed (/(app)/index.tsx).
# Scroll up first to make sure we're at the top.
- scrollUntilVisible:
element:
text: "Was bewegt dich gerade?"
direction: UP
timeout: 4000
- assertVisible:
text: "Was bewegt dich gerade?"
# Tap placeholder to focus the TextInput (sets focused=true, showActions=true)
- tapOn:
text: "Was bewegt dich gerade?"
- waitForAnimationToEnd:
timeout: 1000
# Type post content — unique enough to find in DB for cleanup
- inputText: "[E2E] Maestro-Testpost — bitte ignorieren."
# After text input: action row appears with "Teilen" button
- assertVisible:
text: "Teilen"
# Submit. API call: POST /api/community/post → returns 200 → queryClient invalidates
- tapOn:
text: "Teilen"
- waitForAnimationToEnd:
timeout: 8000
# After success: cancel() is called → content reset → ComposeCard shows placeholder again
- assertVisible:
text: "Was bewegt dich gerade?"