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: View an outline report
| student1 | C1 | student |
| student2 | C1 | student |
When I log in as "admin"
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 a "Forum" to section "1" and I fill the form with:
| Forum name | Forum name |
| Description | Forum description |
@ -36,17 +35,17 @@ Feature: View an outline report
| loglegacy | 1 | logstore_legacy |
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 follow "Forum name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Book name"
And I log out
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Book name"
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
When I navigate to "Activity report" node in "Course administration > Reports"
Then I should see "2 by 2 users" in the "Book name" "table_row"
And I should see "1 by 1 users" in the "Forum name" "table_row"
@ -57,17 +56,17 @@ Feature: View an outline report
And "Disable" "link" should exist in the "Standard log" "table_row"
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 follow "Forum name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Book name"
And I log out
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Book name"
And I log out
And I log in as "admin"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
When I navigate to "Activity report" node in "Course administration > Reports"
Then I should see "2 by 2 users" in the "Book name" "table_row"
And I should see "1 by 1 users" in the "Forum name" "table_row"
@ -80,17 +79,17 @@ Feature: View an outline report
| loglegacy | 1 | logstore_legacy |
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 follow "Forum name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Book name"
And I log out
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Book name"
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
When I navigate to "Activity report" node in "Course administration > Reports"
Then I should see "2 by 2 users" in the "Book name" "table_row"
And I should see "1 by 1 users" in the "Forum name" "table_row"
@ -99,23 +98,23 @@ Feature: View an outline report
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And "Enable" "link" should exist in the "Legacy log" "table_row"
And I click on "Disable" "link" in the "Standard log" "table_row"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
When I navigate to "Activity report" node in "Course administration > Reports"
Then I should see "No log reader enabled"
Scenario: Multiple views from a single user are identified as not distinct
Given 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 follow "Forum name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Forum name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Forum name"
And I am on site homepage
And I log out
When 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 "Activity report" node in "Course administration > Reports"
Then I should see "3 by 1 users" in the "Forum name" "table_row"
And I should see "-" in the "Book name" "table_row"
@ -123,25 +122,25 @@ Feature: View an outline report
Scenario: Multiple views from multiple users are identified as not distinct
Given 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 follow "Forum name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Forum name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Forum name"
And I am on site homepage
And I log out
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Forum name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Forum name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Forum name"
And I am on site homepage
And I log out
When 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 "Activity report" node in "Course administration > Reports"
Then I should see "6 by 2 users" in the "Forum name" "table_row"
And I should see "-" in the "Book name" "table_row"
@ -149,7 +148,7 @@ Feature: View an outline report
Scenario: No views from any users
Given I log out
When 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 "Activity report" node in "Course administration > Reports"
Then I should see "-" in the "Forum name" "table_row"
And I should see "-" in the "Book name" "table_row"

View file

@ -17,8 +17,7 @@ Feature: View the user page for the outline report
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
When I log in as "admin"
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 a "Folder" to section "1" and I fill the form with:
| Name | Folder name |
| Description | Folder description |
@ -35,13 +34,13 @@ Feature: View the user page for the outline report
| loglegacy | 1 | logstore_legacy |
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
# We want to view this multiple times, to make sure the count is working.
And I follow "Folder name"
And I follow "Folder name"
And I follow "Folder name"
And I follow "Folder name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# We want to view this multiple times, to make sure the count is working.
And I follow "URL name"
And I follow "URL name"
@ -63,13 +62,13 @@ Feature: View the user page for the outline report
And "Disable" "link" should exist in the "Standard log" "table_row"
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
# We want to view this multiple times, to make sure the count is working.
And I follow "Folder name"
And I follow "Folder name"
And I follow "Folder name"
And I follow "Folder name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# We want to view this multiple times, to make sure the count is working.
And I follow "URL name"
And I follow "URL name"
@ -93,13 +92,13 @@ Feature: View the user page for the outline report
| loglegacy | 1 | logstore_legacy |
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
# We want to view this multiple times, to make sure the count is working.
And I follow "Folder name"
And I follow "Folder name"
And I follow "Folder name"
And I follow "Folder name"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# We want to view this multiple times, to make sure the count is working.
And I follow "URL name"
And I follow "URL name"