MDL-58265 core_test: replace I turn editing on steps

Also remove few more unnecessary steps that redirects behat to
site home page to actually get to the course.

Part of MDL-55611 epic.
This commit is contained in:
Simey Lameze 2017-03-15 15:13:09 +08:00 committed by Damyon Wiese
parent 3353cfd8c1
commit fdeeaff954
458 changed files with 1697 additions and 2148 deletions

View file

@ -86,7 +86,7 @@ Feature: Award badges
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
@ -106,7 +106,7 @@ Feature: Award badges
And I press "Award badge"
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
When I press "Award badge"
And I am on course page "Course Badge"
And I follow "Course Badge"
Then I should see "Recipients (2)"
And I log out
And I log in as "student1"
@ -128,7 +128,7 @@ Feature: Award badges
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
| Enable completion tracking | Yes |
@ -137,7 +137,7 @@ Feature: Award badges
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Submit your online text |
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
@ -156,8 +156,7 @@ Feature: Award badges
And I follow "Profile" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
Then I should not see "badges"
And I am on homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I press "Mark as complete: Test assignment name"
And I follow "Profile" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
@ -177,7 +176,7 @@ Feature: Award badges
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
| Enable completion tracking | Yes |
@ -192,7 +191,7 @@ Feature: Award badges
And I click on "Condition: Activity completion" "link"
And I set the field "Assignment - Test assignment name" to "1"
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
@ -211,8 +210,7 @@ Feature: Award badges
And I follow "Profile" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
Then I should not see "badges"
And I am on homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I click on "Not completed: Test assignment name. Select to mark as complete." "icon"
And I log out
# Completion cron won't mark the whole course completed unless the
@ -242,7 +240,7 @@ Feature: Award badges
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# Create course badge 1.
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
@ -325,7 +323,7 @@ Feature: Award badges
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
@ -345,7 +343,7 @@ Feature: Award badges
And I press "Award badge"
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
When I press "Award badge"
And I am on course page "Course Badge"
And I follow "Course Badge"
Then I should see "Recipients (2)"
And I follow "Recipients (2)"
And I press "Award badge"
@ -353,5 +351,5 @@ Feature: Award badges
And I press "Revoke badge"
And I set the field "existingrecipients[]" to "Student 1 (student1@example.com)"
When I press "Revoke badge"
And I am on course page "Course Badge"
And I follow "Course Badge"
Then I should see "Recipients (0)"