appId: ${APP_ID}
env:
  USERNAME: john.doe@example.com
  MODULE_NAME: Time off
---
- runFlow: ../navigate-to-module.yml
- assertVisible: .*PTO.*
- tapOn: .*PTO.*
- assertVisible: .*PTO.*
- assertVisible: .*Balance detail.*
- assertVisible: .*Policy description.*
- tapOn: .*Policy description.*
- tapOn:
    point: 49%,33%
- waitForAnimationToEnd:
    timeout: 1000
- tapOn: .*Request.*
- assertVisible: .*Request.*
- assertVisible: .*What type of request?.*
- assertVisible: .*Since when?.*
- assertVisible: .*Select the first day of your leave.*
- assertVisible: .*Until when?.*
- assertVisible: .*Select the last day of your leave.*
- assertVisible: .*Observations*
- assertVisible: .*Send request*
- tapOn:
    text: .*MM/DD/YYYY.*
    index: 0
- runScript: ../scripts/getStartDate.js
- tapOn: ${output.startDate}
- tapOn: .*Apply*
- waitForAnimationToEnd:
    timeout: 1000
- tapOn: .*MM/DD/YYYY.*
- runScript: ../scripts/getEndDate.js
- tapOn: ${output.endDate}
- tapOn: .*Apply*
- waitForAnimationToEnd:
    timeout: 1000
- tapOn: .*Enter a description*
- waitForAnimationToEnd:
    timeout: 1000
- inputText: .*Test description.*
- tapOn: .*Done*
- waitForAnimationToEnd:
    timeout: 1000
- assertVisible: .*20/250*
- scrollUntilVisible:
    element: .*You are requesting.*
- assertVisible: .*You are requesting.*
- runFlow: ../submit-request-form.yml
