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

@ -19,8 +19,7 @@ Feature: Enable Block Completion in a course
Scenario: Add the block to a the course where completion is disabled
Given I log in as "teacher1"
And I am on course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
| Enable completion tracking | No |
@ -30,8 +29,7 @@ Feature: Enable Block Completion in a course
Scenario: Add the block to a the course where completion is not set
Given I log in as "teacher1"
And I am on course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
When I add the "Course completion status" block
Then I should see "No completion criteria set for this course" in the "Course completion status" "block"
@ -40,8 +38,7 @@ Feature: Enable Block Completion in a course
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
And I log in as "teacher1"
And I am on course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I follow "Test page name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:

View file

@ -22,8 +22,7 @@ Feature: Enable Block Completion in a course using activity completion
Scenario: Add the block to a the course and add course completion items
Given I log in as "teacher1"
And I am on course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I follow "Test page name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
@ -38,14 +37,13 @@ Feature: Enable Block Completion in a course using activity completion
And I press "Save changes"
And I log out
When I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
Then I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "0 of 1" in the "Activity completion" "table_row"
Scenario: Add the block to a the course and add course completion items
Given I log in as "teacher1"
And I am on course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I follow "Test page name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
@ -60,13 +58,13 @@ Feature: Enable Block Completion in a course using activity completion
And I press "Save changes"
And I log out
When I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test page name"
And I follow "C1"
Then I should see "Status: Pending" in the "Course completion status" "block"
And I should see "0 of 1" in the "Activity completion" "table_row"
And I trigger cron
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "1 of 1" in the "Activity completion" "table_row"
And I follow "More details"
And I should see "Yes" in the "Activity completion" "table_row"

View file

@ -21,8 +21,7 @@ Feature: Enable Block Completion in a course using manual completion by others
Scenario: Add the block to a the course and mark a student complete.
Given I log in as "teacher1"
And I am on course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
And I navigate to "Course completion" node in "Course administration"
And I expand all fieldsets
@ -31,12 +30,12 @@ Feature: Enable Block Completion in a course using manual completion by others
And I press "Save changes"
And I log out
When I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "No" in the "Teacher" "table_row"
And I log out
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 "Course completion" node in "Course administration > Reports"
And I follow "Click to mark user complete"
# Running completion task just after clicking sometimes fail, as record
@ -46,7 +45,7 @@ Feature: Enable Block Completion in a course using manual completion by others
And I am on site homepage
And I log out
And I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
Then I should see "Status: Complete" in the "Course completion status" "block"
And I should see "Yes" in the "Teacher" "table_row"
And I follow "More details"
@ -54,8 +53,7 @@ Feature: Enable Block Completion in a course using manual completion by others
Scenario: Add the block to a the course and require multiple roles to mark a student complete.
Given I log in as "teacher1"
And I am on course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
And I navigate to "Course completion" node in "Course administration"
And I expand all fieldsets
@ -66,18 +64,18 @@ Feature: Enable Block Completion in a course using manual completion by others
And I press "Save changes"
And I log out
When I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "No" in the "Teacher" "table_row"
And I should see "No" in the "Non-editing teacher" "table_row"
And I log out
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 "Course completion" node in "Course administration > Reports"
And I follow "Click to mark user complete"
And I log out
And I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "Status: In progress" in the "Course completion status" "block"
And I should see "Yes" in the "Teacher" "table_row"
And I should see "No" in the "Non-editing teacher" "table_row"
@ -86,7 +84,7 @@ Feature: Enable Block Completion in a course using manual completion by others
And I should see "No" in the "Marked complete by Non-editing teacher" "table_row"
And I log out
And I log in as "teacher2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Course completion" node in "Course administration > Reports"
And I follow "Click to mark user complete"
# Running completion task just after clicking sometimes fail, as record
@ -96,7 +94,7 @@ Feature: Enable Block Completion in a course using manual completion by others
And I am on site homepage
And I log out
And I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
Then I should see "Status: Complete" in the "Course completion status" "block"
And I should see "Yes" in the "Teacher" "table_row"
And I should see "Yes" in the "Non-editing teacher" "table_row"

View file

@ -17,8 +17,7 @@ Feature: Enable Block Completion in a course using manual self completion
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
And I add the "Self completion" block
And I navigate to "Course completion" node in "Course administration"
@ -28,7 +27,7 @@ Feature: Enable Block Completion in a course using manual self completion
And I press "Save changes"
And I log out
When I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "No" in the "Self completion" "table_row"
And I follow "Complete course"
@ -39,7 +38,7 @@ Feature: Enable Block Completion in a course using manual self completion
# should be created before the task runs.
And I wait "1" seconds
And I run the scheduled task "core\task\completion_regular_task"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
Then I should see "Status: Complete" in the "Course completion status" "block"
And I should see "Yes" in the "Self completion" "table_row"
And I follow "More details"