appId: com.toughra.ustadmobile
tags:
  - contentH5p
  - contentTest
env:
  TESTRESULTSDIR: "build/reports/maestro/001_001_admin_can_add_content_001-h5p/Screenshots"
onFlowStart:
  - startRecording: 001_001_admin_can_add_content_001-h5p
  - runScript:
      file: "common/startserver.js"
      env:
        TESTCONTROLLER_URL: ${TESTCONTROLLER_URL}
  - clearState: com.toughra.ustadmobile
onFlowComplete:
  - stopRecording
  - runScript:
      file: "common/stopserver.js"
      env:
        TESTCONTROLLER_URL: ${TESTCONTROLLER_URL}
---
- runFlow:
    file: "common/clear_login_and_add_content.yaml"
    env:
      TESTFILENAME: "H5p_Content.h5p"
- tapOn: "SAVE"
- takeScreenshot: "${TESTRESULTSDIR}/content_add_to_library"
- tapOn: "True/False Question"
- extendedWaitUntil:
    notVisible: "Importing"
    timeout: 80000
- extendedWaitUntil:
    notVisible: "Uploading"
    timeout: 80000
- tapOn: Open
- runFlow:
    file: "common/chrome-first-run-check.yaml"
- assertVisible: "Check"
- tapOn: "Close tab"
- runFlow:
    file: "common/login_download_and_open_content.yaml"
- tapOn: "Library"
- extendedWaitUntil:
    visible: "True/False Question"
    timeout: 80000
- tapOn: "True/False Question"
- tapOn: Download
- tapOn: Open
- extendedWaitUntil:
    visible: "Check"
    timeout: 5000
- takeScreenshot: "${TESTRESULTSDIR}/h5p_content_download_and_open"
- tapOn: "Yes "
- tapOn: "Check"
- tapOn: "Close tab"
- tapOn: "Attempts"
- assertVisible:
    text: "True/False Question"
    id: "app_title"
- assertVisible: "Admin User: Passed"
- assertVisible: "1 Attempts"
- assertVisible: "100%"
- assertVisible: "Score"
- tapOn: "Admin User: Passed"
- assertVisible:
    text: "Admin User - True/False Question"
    id: "app_title"
- assertVisible: "Passed"
- assertVisible: "100%"
- assertVisible: "Score"
- assertVisible:
    id: "progress_bar"
- tapOn:
    id: "progress_bar"
- assertVisible:
    text: "True/False Question"
    id: "app_title"
- assertVisible: "100%"
- assertVisible: "Score"
- assertVisible: "Answered"
- assertVisible: "Attempted"
- assertVisible: "Interacted"
- assertVisible: "Answered "


