appId: ${APP_ID}
env:
  # Default community name
  COMMUNITY_NAME: ${COMMUNITY_NAME || 'Humand E2E'}
  # Default password
  PASSWORD: ${PASSWORD || '12345678'}
---
- tapOn:
    text: 'User'
    index: 1
- inputText: ${USERNAME}
- runFlow: ./dismiss-keyboard.yml
- tapOn: 'Continue'
- runFlow:
    when:
      notVisible: 'Log in'
    commands:
      - scrollUntilVisible:
          element: ${COMMUNITY_NAME}
          direction: DOWN
      - tapOn: ${COMMUNITY_NAME}
      - assertVisible: ${COMMUNITY_NAME}
      - runFlow: ./login-enter-password.yml
- runFlow:
    when:
      visible: 'Log in'
    commands:
      - runFlow: ./login-enter-password.yml
- runFlow:
    when:
      visible: 'Your feedback helps us'
    commands:
      - tapOn: 'Close'
- runFlow:
    when:
      visible: '.*(quiere enviarte notificaciones|Would Like to Send You Notifications).*'
    commands:
      - tapOn:
          text: '.*(Permitir|Allow).*'
- assertVisible: 'Home'
