Fix course test

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent 62083f6595
commit 2cb9fe84fb
  1. 22
      tests/behat/features/course.feature
  2. 45
      tests/behat/features/createCourse.feature

@ -10,6 +10,19 @@ Feature: Course tools basic testing
And I am a "English" user
# This is executed just before each scenario below
Scenario: See the courses list
Given I am on "/main/admin/course_list.php"
Then I should see "Course list"
And I should not see "not authorized"
Scenario: See the course creation link on the admin page
Given I am on "/main/admin/index.php"
Then I should see "Create a course"
Scenario: Access the course creation page
Given I am on "/main/admin/course_add.php"
Then I should not see "not authorized"
Scenario: Create a course before testing
Given I am on "/main/admin/course_add.php"
When I fill in "title" with "TEMP"
@ -140,4 +153,13 @@ Feature: Course tools basic testing
And I am on "/main/course_info/maintenance.php"
Then I should not see an ".alert-danger" element
# Scenario: Enter to public password-protected course
# Given I have a public password-protected course named "PASSWORDPROTECTED" with password "123456"
# And I am not logged
# And I am on "/courses/PASSWORDPROTECTED/index.php"
# When I fill in "course_password" with "123456"
# And I press "submit"
# Then I should not see "The course password is incorrect"

@ -1,45 +0,0 @@
@administration
Feature: Courses management as admin
In order to add courses
As an administrator
I need to be able to create new courses from the admin page
Background:
Given I am a platform administrator
# This is executed just before each scenario below
Scenario: See the courses list
Given I am on "/main/admin/course_list.php"
Then I should see "Course list"
And I should not see "not authorized"
Scenario: See the course creation link on the admin page
Given I am on "/main/admin/index.php"
Then I should see "Create a course"
Scenario: Access the course creation page
Given I am on "/main/admin/course_add.php"
Then I should not see "not authorized"
Scenario: Access the course creation page
Given I am on "/main/admin/course_add.php"
When I fill in "title" with "TESTCOURSE1"
And I press "submit"
Then I should see "Course list"
Scenario: Search and delete a course
Given I am on "/main/admin/course_list.php"
And I fill in "course-search-keyword" with "TESTCOURSE1"
And I press "submit"
When I follow "Delete"
And I confirm the popup
Then I should see "Course list"
And I should not see "not be deleted"
# Scenario: Enter to public password-protected course
# Given I have a public password-protected course named "PASSWORDPROTECTED" with password "123456"
# And I am not logged
# And I am on "/courses/PASSWORDPROTECTED/index.php"
# When I fill in "course_password" with "123456"
# And I press "submit"
# Then I should not see "The course password is incorrect"
Loading…
Cancel
Save