appId: com.toughra.ustadmobile
---
# in this test admin create a course and add members to the course -2 teachers and 6 students
  # Member list
  # -----name - username/password

  # teachers :
  # --0-- Teacher 1   - t1/test

  # students :
  # --0-- Student 1    - s1/test
  # --1-- Student 2    - s2/test
  # --2-- Student 3    - s3/test
  # --3-- Student 4    - s4/test
  # --4-- Student 5    - s5/test
  # --5-- Student 6    - s6/test

# test parameters needs to provide for this test :
# 1) TESTRESULTSDIR : ${TESTRESULTSDIR} : provides the path to store test results


# add new course
- runFlow:
    file: "./add_course.yaml"
    env:
      TESTCOURSENAME: ${TESTCOURSENAME}
# add new teacher using flow - add_new_teacher_inside_course ----------- t1
- runFlow:
    file: "./add_new_teacher_inside_course.yaml"
    env:
      TESTCOURSENAME: ${TESTCOURSENAME}
      TEACHERFIRSTNAME: "Teacher"
      TEACHERLASTNAME: "1"
      USERNAME: "t1"
      GENDER: "Female"
      PASSWORD: "test"

# add new student using flow - add_new_student_inside_course ----------- s1
- runFlow:
    file: "./add_new_student_inside_course.yaml"
    env:
      TESTCOURSENAME: ${TESTCOURSENAME}
      STUDENTFIRSTNAME: "Student"
      STUDENTLASTNAME: "1"
      USERNAME: "s1"
      GENDER: "Male"
      PASSWORD: "test"
# add new student using flow - add_new_student_inside_course --------- s2
- runFlow:
    file: "./add_new_student_inside_course.yaml"
    env:
      TESTCOURSENAME: ${TESTCOURSENAME}
      STUDENTFIRSTNAME: "Student"
      STUDENTLASTNAME: "2"
      USERNAME: "s2"
      GENDER: "Female"
      PASSWORD: "test"
# add new student  using flows - add_new_people & add_member_inside_course ------- s3
- runFlow:
    file: "./add_new_people.yaml"
    env:
      FIRSTNAME: "Student"
      LASTNAME: "3"
      USERNAME: "s3"
      GENDER: "Male"
      PASSWORD: "test"
- runFlow:
    file: "./add_member_inside_course.yaml"
    env:
      TESTCOURSENAME: ${TESTCOURSENAME}
      FIRSTNAME: "Student"
      LASTNAME: "3"
      MEMBER: "student"
# add new student  using flows - add_new_people & add_member_inside_course ------- s4
- runFlow:
    file: "./add_new_people.yaml"
    env:
      FIRSTNAME: "Student"
      LASTNAME: "4"
      USERNAME: "s4"
      GENDER: "Male"
      PASSWORD: "test"
- runFlow:
    file: "./add_member_inside_course.yaml"
    env:
      TESTCOURSENAME: ${TESTCOURSENAME}
      FIRSTNAME: "Student"
      LASTNAME: "4"
      MEMBER: "student"
# add new student  using flows - add_new_people & add_member_inside_course ------- s5
- runFlow:
    file: "./add_new_people.yaml"
    env:
      FIRSTNAME: "Student"
      LASTNAME: "5"
      USERNAME: "s5"
      GENDER: "Female"
      PASSWORD: "test"
- runFlow:
    file: "./add_member_inside_course.yaml"
    env:
      TESTCOURSENAME: ${TESTCOURSENAME}
      FIRSTNAME: "Student"
      LASTNAME: "5"
      MEMBER: "student"
# add new student  using flows - add_new_people & add_member_inside_course -------s6
- runFlow:
    file: "./add_new_people.yaml"
    env:
      FIRSTNAME: "Student"
      LASTNAME: "6"
      USERNAME: "s6"
      GENDER: "Female"
      PASSWORD: "test"
- runFlow:
    file: "./add_member_inside_course.yaml"
    env:
      TESTCOURSENAME: ${TESTCOURSENAME}
      FIRSTNAME: "Student"
      LASTNAME: "6"
      MEMBER: "student"
- takeScreenshot: "${TESTRESULTSDIR}/screenshots/member_list_of_new_test_course"