appId: com.toughra.ustadmobile
env:
  TESTRESULTSDIR: "${TESTRESULTSDIR}/001_001_admin_can_add_content_002-epub"
  TESTNAME: "001_001_admin_can_add_content_002-epub"
---
- clearState: com.toughra.ustadmobile
- runFlow:
    file: "../common/startserver.yaml"
    env:
      CONTROLSERVER: ${CONTROLSERVER}
      TESTSERIAL: ${TESTSERIAL}
      TESTNAME: ${TESTNAME}
- runFlow:
    file: "../common/clear_login_and_add_content.yaml"
    env:
      TESTFILENAME: Epub_Content1.epub
      CONTROLSERVER: ${CONTROLSERVER}
      TESTSERIAL: ${TESTSERIAL}
- tapOn: "SAVE"
- takeScreenshot: "${TESTRESULTSDIR}/screenshots/content_add_to_library"
- tapOn: "E-book"
- extendedWaitUntil:
    notVisible: "Importing"
    timeout: 10000
- extendedWaitUntil:
    notVisible: "Uploading"
    timeout: 10000
- tapOn: Open
- assertVisible: "Cover"
- tapOn: "Back"
- runFlow:
    file: "../common/login_download_and_open_content.yaml"
#Download and open content
- tapOn: "Library"
- extendedWaitUntil:
    visible: "E-book"
    timeout: 60000
- tapOn: "E-book"
- tapOn: Download
- tapOn: Open
- assertVisible: "Cover"
- takeScreenshot: "${TESTRESULTSDIR}/screenshots/epub_content_download_and_open"
