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

86 lines
2.7 KiB
YAML

# settings/dark-theme.yaml
# Tests: Login → Header dropdown → Settings → Theme picker → Dark mode selected.
# Pre-requisite: App installed. Test-user exists on staging.
# Env-Vars: E2E_TEST_USER, E2E_TEST_PASSWORD
# Expected outcome: After selecting "Dunkel", Settings screen reflects dark theme
# (background color changes — Maestro cannot assert CSS, but
# assertVisible on a dark-only element or the "Dunkel" value chip
# confirms the selection was persisted in local store).
#
# IMPORTANT: Theme is stored in MMKV (useThemeStore). clearState: true resets it
# to 'system' each run — so this flow always starts from system default.
#
# The theme menu is a @react-native-menu/menu MenuView (native iOS context menu).
# Maestro can trigger the anchor Pressable but may NOT be able to interact with
# the native UIMenu popover on iOS. If this step fails, it is a Maestro limitation
# with native context menus — add to SETUP.md known issues.
# Alternative: implement a test-only theme toggle button accessible via testID.
# See TODO_TESTIDS.md.
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
- assertVisible:
text: "ReBreak"
# Open Header dropdown → Settings
- tapOn:
point: "93%, 6%"
- waitForAnimationToEnd:
timeout: 2000
# t('headerMenu.settings') = "Einstellungen" (de.json)
- assertVisible:
text: "Einstellungen"
- tapOn:
text: "Einstellungen"
- waitForAnimationToEnd:
timeout: 3000
# Settings screen: AppHeader title = t('settings.title') = "Einstellungen"
- assertVisible:
text: "Einstellungen"
# Theme section: t('settings.theme') = "Erscheinungsbild" (de.json) — row label.
# The current value chip shows t('settings.theme_system') = "Systemstandard" initially.
- assertVisible:
text: "Erscheinungsbild"
# Tap the value chip (MenuView anchor Pressable) to open iOS UIMenu.
# WARNING: Native UIMenu interaction may not work in Maestro — see header note.
# We tap on the current value "Systemstandard" which is inside the anchor Pressable.
- tapOn:
text: "Systemstandard"
- waitForAnimationToEnd:
timeout: 1500
# iOS native UIMenu: items are "Systemstandard", "Hell", "Dunkel"
# t('settings.theme_dark') = "Dunkel" (de.json)
- tapOn:
text: "Dunkel"
- waitForAnimationToEnd:
timeout: 1500
# After selection: the value chip in the row should now show "Dunkel"
- assertVisible:
text: "Dunkel"