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

@ -58,7 +58,7 @@ Feature: Enable the course_list block on a category page and view it's contents
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
And I am on course page "Course 3"
And I am on "Course 3" course homepage
And I should see "Course 3"
Scenario: Add the course list block on category page and view as an admin

View file

@ -27,8 +27,7 @@ Feature: Enable the course_list block on a course page and view it's contents
Scenario: Add the course list block on course page and navigate to the course listing
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 "Courses" block
Then I should see "Course 1" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
@ -39,21 +38,18 @@ Feature: Enable the course_list block on a course page and view it's contents
Scenario: Add the course list block on course page and navigate to another course
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 "Courses" block
Then I should see "Course 1" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
And I am on course page "Course 3"
And I am on "Course 3" course homepage
And I should see "Course 3"
Scenario: Add the course list block on course page and view as an admin
Given I log in as "admin"
And I am on site homepage
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 "Courses" block
Then I should see "Miscellaneous" in the "Course categories" "block"
And I should see "Category 1" in the "Course categories" "block"
@ -68,8 +64,7 @@ Feature: Enable the course_list block on a course page and view it's contents
Given the following config values are set as admin:
| block_course_list_hideallcourseslink | 1 |
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
When I add the "Courses" block
Then I should not see "All courses" in the "My courses" "block"
@ -80,9 +75,7 @@ Feature: Enable the course_list block on a course page and view it's contents
| user | course | role |
| admin | C1 | editingteacher |
And I log in as "admin"
And I am on site homepage
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 "Courses" block
Then I should not see "Miscellaneous" in the "My courses" "block"
And I should not see "Category 1" in the "My courses" "block"

View file

@ -44,7 +44,7 @@ Feature: Enable the course_list block on the dashboard and view it's contents
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
And I am on course page "Course 3"
And I am on "Course 3" course homepage
And I should see "Course 3"
Scenario: Add the course list block on the dashboard and view as an admin

View file

@ -52,7 +52,7 @@ Feature: Enable the course_list block on the frontpage and view it's contents
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
And I am on course page "Course 3"
And I am on "Course 3" course homepage
And I should see "Course 3"
Scenario: Add the course list block on the frontpage page and view as an admin