appId: ${APP_ID}
env:
  USERNAME: john.doe@example.com
  MODULE_NAME: Time off
---
- runFlow: ../navigate-to-module.yml
- assertVisible: .*Floating days.*
- tapOn: .*Floating days.*
- assertVisible: .*Floating days.*
- assertVisible: .*Balance detail.*
- assertVisible: .*Policy description.*
- tapOn: .*Policy description.*
- tapOn:
    point: 49%,33%
- tapOn: .*Request.*
- waitForAnimationToEnd:
    timeout: 1000
- assertVisible: .*Request.*
- assertVisible: .*What type of request?.*
- assertVisible: .*Since when?.*
- assertVisible: .*Select the first day of your leave.*
- assertVisible: .*Duration of the first day.*
- assertVisible: .*Until when?.*
- assertVisible: .*Duration of the last day.*
- 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: .*Full Day*
- waitForAnimationToEnd:
    timeout: 1000
- tapOn: .*Half Day*
- waitForAnimationToEnd:
    timeout: 1000
- tapOn: .*MM/DD/YYYY.*
- runScript: ../scripts/getEndDate.js
- tapOn: ${output.endDate}
- tapOn: .*Apply*
- waitForAnimationToEnd:
    timeout: 1000
- tapOn: .*Full Day*
- waitForAnimationToEnd:
    timeout: 1000
- tapOn: .*Half Day*
- waitForAnimationToEnd:
    timeout: 1000
- scrollUntilVisible:
    element: .*Enter a description.*
- tapOn: .*Enter a description*
- waitForAnimationToEnd:
    timeout: 1000
- inputText: .*Test description.*
- tapOn: .*Done*
- waitForAnimationToEnd:
    timeout: 1000
- scrollUntilVisible:
    element: .*20/250.*
- assertVisible: .*20/250.*
- scrollUntilVisible:
    element: .*You are requesting.*
- assertVisible: .*You are requesting.*
- runFlow: ../submit-request-form.yml
