appId: com.edde746.plezy
name: Start and exit video playback
tags:
  - e2e
  - playback
---
- runFlow: ../subflows/ensure_onboarded.yaml
- tapOn: "(?s)^Libraries.*"
- tapOn: "Browse"
- extendedWaitUntil:
    visible: "(?s).*Alpha Archive.*"
    timeout: 15000
- tapOn: "(?s).*Alpha Archive.*"
- extendedWaitUntil:
    visible: "Play"
    timeout: 15000
- tapOn:
    text: "Play"
    waitToSettleTimeoutMs: 1000
- runFlow:
    when:
      platform: iOS
    commands:
      - extendedWaitUntil:
          visible: "Video timeline"
          timeout: 20000
      - extendedWaitUntil:
          visible: "(?s).*Alpha Archive.*\\n0min\\n0:(?:0[1-9]|[1-5][0-9])\\n-.*"
          timeout: 10000
- runFlow:
    when:
      platform: Android
    commands:
      - extendedWaitUntil:
          visible: "Pause"
          timeout: 20000
- runFlow:
    when:
      platform: iOS
    commands:
      - tapOn:
          point: "90%, 5%"
      - extendedWaitUntil:
          visible: "Overview"
          timeout: 10000
- runFlow:
    when:
      platform: Android
    commands:
      - back
      - extendedWaitUntil:
          notVisible: "Pause"
          timeout: 10000
      - back
      - extendedWaitUntil:
          visible: "Overview"
          timeout: 10000
