createCourse.feature 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. @administration
  2. Feature: Courses management as admin
  3. In order to add courses
  4. As an administrator
  5. I need to be able to create new courses from the admin page
  6. Background:
  7. Given I am a platform administrator
  8. # This is executed just before each scenario below
  9. Scenario: See the courses list
  10. Given I am on "/main/admin/course_list.php"
  11. Then I should see "Course list"
  12. And I should not see "not authorized"
  13. Scenario: See the course creation link on the admin page
  14. Given I am on "/main/admin/index.php"
  15. Then I should see "Create a course"
  16. Scenario: Access the course creation page
  17. Given I am on "/main/admin/course_add.php"
  18. Then I should not see "not authorized"
  19. Scenario: Access the course creation page
  20. Given I am on "/main/admin/course_add.php"
  21. When I fill in "title" with "TESTCOURSE1"
  22. And I press "submit"
  23. Then I should see "Course list"
  24. Scenario: Search and delete a course
  25. Given I am on "/main/admin/course_list.php"
  26. And I fill in "course-search-keyword" with "TESTCOURSE1"
  27. And I press "submit"
  28. When I follow "Delete"
  29. Then I should see "Course list"
  30. And I should not see "not be deleted"
  31. Scenario: Enter to public password-protected course
  32. Given I have a public password-protected course named "PASSWORDPROTECTED" with password "123456"
  33. And I am not logged
  34. And I am on "/courses/PASSWORDPROTECTED/index.php"
  35. When I fill in "course_password" with "123456"
  36. And I press "submit"
  37. Then I should not see "The course password is incorrect"