# screens/06-mail-schutz.yaml
#
# Marketing-Screenshot 06: Mail-Schutz-Ansicht
#
# Ziel: Mail-Tab geöffnet. Zeigt entweder:
#   - Verbundenes Postfach mit Statistiken (Mail-Schutz aktiv) — ideal
#   - MailEmptyState mit "Noch keine Mails blockiert" + Connect-CTA — akzeptabel
#
# Das Mail-Tab ist über den Bottom-Tab-Bar "Mail" erreichbar.
# de.json: tabs.mail = "Mail", mail.title = "Mail-Schutz"
#
# Screenshot-Output: screenshots/06-mail-schutz.png
# Env-Vars: E2E_TEST_USER, E2E_TEST_PASSWORD

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"

# --- Mail Tab ---
# tabs.mail = "Mail" (de.json)
- tapOn:
    text: "Mail"
- waitForAnimationToEnd:
    timeout: 4000

# Mail-Screen geladen: Titel "Mail-Schutz" (mail.title, de.json)
- assertVisible:
    text: "Mail-Schutz"

- waitForAnimationToEnd:
    timeout: 1000

- takeScreenshot: screenshots/06-mail-schutz
