appId: com.toughra.ustadmobile

---
# This test tests the adding profile pic to the profile
# Test parameters needs to provide for this test :
 # 1) TESTFILENAME : provide the profile pic file name
 # 2)TESTRESULTSDIR : ${TESTRESULTSDIR} : provides the path to store test results
 # 3) CONTROLSERVER: ${CONTROLSERVER} : provides the test-control-server address
 # 4) TESTSERIAL: ${TESTSERIAL} : provides the device serial number


# clear the app
- clearState: com.toughra.ustadmobile

# clear the downloads
- evalScript: ${http.get(CONTROLSERVER + "cleardownloads?device=" + TESTSERIAL)}

# push the test file to the downloads
- evalScript: ${http.get(CONTROLSERVER + "pushcontent?test-file-name=" + TESTFILENAME +"&device=" + TESTSERIAL)}

# get started
- launchApp
- tapOn: "GET STARTED"
# select site
- runFlow: "./select_site.yaml"
# admin login
- runFlow:
    file: "./user_login.yaml"
- tapOn: "People"
- tapOn: "Admin User"
- tapOn:
    id: "floating_action_button"
- tapOn: "Add"
- tapOn: "Select picture from files"
- runFlow:
    when:
      visible: "Show roots"
    file: select_picture_from_files.yaml
    env:
      TESTFILENAME: ${TESTFILENAME}
- scrollUntilVisible:
    element:
      text: "Gender*"
    direction: DOWN
- tapOn: "Gender*"
- tapOn: "Male"
- tapOn: "SAVE"