appId: ${APP_ID}
env:
  USERNAME: foo.bar@example.com
  COURSE_NAME: E2E curso completo
  PATH_NAME: E2E path completo
  SESSION_NAME: E2E session
---
# === SETUP ===
- runFlow: ../../shared/launch-app.yml
- runFlow: ../../shared/login-to-community.yml

# Enter Learning module from Apps
- runFlow:
    file: ../../shared/go-to-module-from-apps.yml
    env:
      MODULE_NAME: Learning

# === LEARNING HOME ===
- runFlow: ./subFlows/learning-home.yml

# === COURSES ===
- runFlow:
    file: ./subFlows/courses.yml
    env:
      COURSE_NAME: ${COURSE_NAME}

# === COURSE DETAIL + LESSONS ===
- runFlow:
    file: ./subFlows/course.yml
    env:
      COURSE_NAME: ${COURSE_NAME}
# Course detail → Courses list → Learning home
- tapOn: Back
- tapOn: Back
- assertVisible: Learning

# === PATHS ===
- runFlow:
    file: ./subFlows/paths.yml
    env:
      PATH_NAME: ${PATH_NAME}

# === PATH DETAIL ===
- runFlow:
    file: ./subFlows/path.yml
    env:
      PATH_NAME: ${PATH_NAME}
# Path detail → Paths list → Learning home
- tapOn: Back
- tapOn: Back
- assertVisible: Learning

# === SESSIONS ===
- runFlow:
    file: ./subFlows/sessions.yml
    env:
      SESSION_NAME: ${SESSION_NAME}

# === SESSION DETAIL ===
# (inlined — too simple to warrant its own file)
- tapOn:
    text: '.*${SESSION_NAME}.*'
- assertVisible:
    text: '.*${SESSION_NAME}.*'
# Session detail → Sessions list → Learning home
- tapOn: Back
- tapOn: Back
- assertVisible: Learning
