Skip to content

Commit

Permalink
MDL-52805 core: Remove references to old logging in behat
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolate-lightning committed Mar 7, 2023
1 parent 33ebbdd commit 00747e2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 146 deletions.
46 changes: 0 additions & 46 deletions report/log/tests/behat/filter_log.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,6 @@ Feature: In a report, admin can filter log data
| alternativefullnameformat | middlename, alternatename, firstname, lastname |
And I log in as "admin"

Scenario: Filter log report for standard and legacy log reader
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And I click on "Enable" "link" in the "Legacy log" "table_row"
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I am on homepage
And I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Ann, Jill, Grainne, Beauchamp"
And I click on "Log in as" "link"
And I press "Continue"
And I log out
And I log in as "admin"
When I navigate to "Reports > Logs" in site administration
And I set the field "id" to "Acceptance test site (Site)"
And I set the field "user" to "All participants"
And I set the field "logreader" to "Standard log"
And I press "Get these logs"
Then I should see "User logged in as another user"
And I set the field "logreader" to "Legacy log"
And I press "Get these logs"
And I should see "user login"
And I should not see "Nothing to display"

Scenario: Filter log report for standard log reader
Given I am on "Course 1" course homepage
And I navigate to course participants
Expand All @@ -58,25 +34,3 @@ Feature: In a report, admin can filter log data
And I set the field "user" to "All participants"
And I press "Get these logs"
Then I should see "User logged in as another user"

Scenario: Filter log report for legacy log reader
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And I click on "Enable" "link" in the "Legacy log" "table_row"
And I click on "Disable" "link" in the "Standard log" "table_row"
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I am on homepage
And I am on "Course 1" course homepage
And I am on homepage
And I am on "Course 1" course homepage
And I navigate to course participants
And I follow "Ann, Jill, Grainne, Beauchamp"
And I click on "Log in as" "link"
And I press "Continue"
And I log out
And I log in as "admin"
When I navigate to "Reports > Logs" in site administration
And I set the field "id" to "Acceptance test site (Site)"
And I set the field "user" to "All participants"
And I press "Get these logs"
Then I should see "user login"
47 changes: 4 additions & 43 deletions report/loglive/tests/behat/loglive_report.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,21 @@ Feature: In a report, admin can see loglive data
| fullnamedisplay | firstname |
| alternativefullnameformat | middlename, alternatename, firstname, lastname |
And I log in as "admin"
And I navigate to "Plugins > Logging > Manage log stores" in site administration
And I click on "Enable" "link" in the "Legacy log" "table_row"
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I am on "Course 1" course homepage with editing mode on
And I add a "Database" to section "3" and I fill the form with:
| Name | Test name |
| Description | Test database description |

@javascript
Scenario: Check loglive report entries and make sure the report works for standard and legacy reader
Scenario: Check loglive report entries and make sure the report works for standard reader
Given I navigate to "Reports > Live logs" in site administration
When I set the field "reader" to "Standard log"
Then I should see "Course module created"
And I should see "Test name"
And I set the field "reader" to "Legacy log"
And I wait to be redirected
And I should see "course_add mod"
When I should see "Course module created"
Then I should see "Test name"

@javascript @_switch_window
Scenario: Check loglive report entries and make sure the pause/resume button works for standard reader along with ajax calls
Given I am on site homepage
When I navigate to "Reports > Live logs" in site administration
And I set the field "reader" to "Standard log"
And I wait to be redirected
And I should not see "Test name2"
And I press "Pause live updates"
And I follow "Course module created"
Expand All @@ -60,42 +50,13 @@ Feature: In a report, admin can see loglive data
And I wait "8" seconds
And I should see "Test name2"

@javascript @_switch_window
Scenario: Check loglive report entries and make sure the pause/resume button works for legacy reader along with ajax calls
Given I am on site homepage
When I navigate to "Reports > Live logs" in site administration
And I set the field "reader" to "Legacy log"
And I wait to be redirected
And I should not see "Test name2"
And I press "Pause live updates"
And I follow "course_add mod"
And I switch to "action" window
And I am on "Course 1" course homepage
And I change window size to "large"
And I reload the page
And I add a "Database" to section "3" and I fill the form with:
| Name | Test name2 |
| Description | Test database description |
And I switch to the main window
And I wait "8" seconds
Then I should not see "Test name2"
And I press "Resume live updates"
And I wait "8" seconds
And I should see "Test name2"

@javascript
Scenario: Check course loglive report entries for a user
Given I log out
And I am on the "Test name" "data activity" page logged in as student1
And I log out
And I am on the "Course 1" Course page logged in as admin
And I navigate to "Reports > Live logs" in site administration
When I set the field "reader" to "Standard log"
When I navigate to "Reports > Live logs" in site administration
Then I should see "Course module viewed"
And I should see "Test name"
And I should see "Ann, Jill, Grainne, Beauchamp"
And I set the field "reader" to "Legacy log"
And I wait to be redirected
And I should see "course_add mod"
And I wait "8" seconds
And I should see "Test name"
2 changes: 0 additions & 2 deletions report/outline/tests/behat/filter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Feature: Filter an outline report

Scenario: Filter the outline report by start date
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And "Enable" "link" should exist in the "Legacy log" "table_row"
And "Disable" "link" should exist in the "Standard log" "table_row"
And I am on the "Course 1" course page logged in as student1
And I follow "Forum name"
Expand All @@ -52,7 +51,6 @@ Feature: Filter an outline report

Scenario: Filter the outline report by end date
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And "Enable" "link" should exist in the "Legacy log" "table_row"
And "Disable" "link" should exist in the "Standard log" "table_row"
And I am on the "Course 1" course page logged in as student1
And I follow "Forum name"
Expand Down
20 changes: 0 additions & 20 deletions report/outline/tests/behat/outline.feature
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Feature: View an outline report

Scenario: View the outline report when only the standard log reader is enabled
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And "Enable" "link" should exist in the "Legacy log" "table_row"
And "Disable" "link" should exist in the "Standard log" "table_row"
And I am on the "Course 1" course page logged in as student1
And I follow "Forum name"
Expand All @@ -40,27 +39,8 @@ Feature: View an outline report
Then I should see "2 views by 2 users" in the "Book name" "table_row"
And I should see "1 views by 1 users" in the "Forum name" "table_row"

Scenario: View the outline report when both the standard and legacy log readers are enabled
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And I click on "Enable" "link" in the "Legacy log" "table_row"
And "Disable" "link" should exist in the "Standard log" "table_row"
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I am on the "Course 1" course page logged in as student1
And I follow "Forum name"
And I am on "Course 1" course homepage
And I follow "Book name"
And I am on the "Course 1" course page logged in as student2
And I follow "Book name"
And I am on the "Course 1" course page logged in as teacher1
When I navigate to "Reports" in current page administration
And I click on "Activity report" "link"
Then I should see "2 views by 2 users" in the "Book name" "table_row"
And I should see "1 views by 1 users" in the "Forum name" "table_row"

Scenario: View the outline report when no log reader is enabled
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
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 1" course homepage
When I navigate to "Reports" in current page administration
Expand Down
31 changes: 0 additions & 31 deletions report/outline/tests/behat/user.feature
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Feature: View the user page for the outline report

Scenario: View the user page when only the standard log reader is enabled
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And "Enable" "link" should exist in the "Legacy log" "table_row"
And "Disable" "link" should exist in the "Standard log" "table_row"
And I log out
And I log in as "student1"
Expand All @@ -52,36 +51,6 @@ Feature: View the user page for the outline report
And I should see "4 views"
And I should see "3 views"

Scenario: View the user page when both the standard and legacy log readers are enabled
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And I click on "Enable" "link" in the "Legacy log" "table_row"
And "Disable" "link" should exist in the "Standard log" "table_row"
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I log out
And I log in as "student1"
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 reload the page
And I reload the page
And I reload the page
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 reload the page
And I reload the page
And I follow "Profile" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
When I follow "Outline report"
Then I should see "4 views" in the "Folder name" "table_row"
And I should see "3 views" in the "URL name" "table_row"
And I follow "Profile" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
When I follow "Complete report"
And I should see "4 views"
And I should see "3 views"

Scenario: View the user complete report page when there is a no-grade forum
Given the following "activities" exist:
| activity | name | description | course | idnumber |
Expand Down
6 changes: 2 additions & 4 deletions report/participation/tests/behat/filter_participation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ Feature: In a participation report, admin can filter student actions
Given I log in as "admin"
And I navigate to "Plugins > Logging > Manage log stores" in site administration
And I click on "Disable" "link" in the "Standard log" "table_row"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I log out

And I am on the "Test book name" "book activity" page logged in as student1
And I log out
Expand All @@ -50,7 +48,7 @@ Feature: In a participation report, admin can filter student actions
And I set the field "instanceid" to "Test book name"
And I set the field "roleid" to "Student"
And I press "Go"
Then I should see "Yes (2)"
Then I should see "Yes (1)"

@javascript
Scenario: Filter participation report when only standard log reader is enabled by default
Expand Down

0 comments on commit 00747e2

Please sign in to comment.