-@javascript @tool @tool_monitor @tool_monitor_rule
+@javascript @tool @tool_monitor @tool_monitor_rules
Feature: tool_monitor_rule
In order to manage rules
As an admin
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I follow "Course 1"
- And I navigate to "Manage rules" node in "Course administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Course administration > Reports"
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule course level |
| minutes | 1 |
| Message template | The forum post was created. {modulelink} |
And I press "Save changes"
- And I navigate to "Manage rules" node in "Site administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Site administration > Reports"
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule site level |
Given I log in as "teacher1"
And I am on homepage
And I follow "Course 1"
- And I navigate to "Manage rules" node in "Course administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I press "Add a new rule"
And I set the following fields to these values:
| name | New rule |
Scenario: Delete a rule on course level
Given I log in as "teacher1"
And I follow "Course 1"
- And I navigate to "Manage rules" node in "Course administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Delete rule" "link"
Then I should see "Are you sure you want to delete rule \"New rule course level\"?"
And I press "Yes"
Scenario: Edit a rule on course level
Given I log in as "teacher1"
And I follow "Course 1"
- And I navigate to "Manage rules" node in "Course administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Edit rule" "link"
And I set the following fields to these values:
| name | New rule quiz |
Scenario: Duplicate a rule on course level
Given I log in as "teacher1"
And I follow "Course 1"
- And I navigate to "Manage rules" node in "Course administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Duplicate rule" "link"
Then I should see "Rule successfully duplicated"
And "#toolmonitorrules_r1" "css_element" should appear before "#toolmonitorrules_r2" "css_element"
Scenario: Add a rule on site level
Given I log in as "admin"
- And I navigate to "Manage rules" node in "Site administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Site administration > Reports"
When I press "Add a new rule"
And I set the following fields to these values:
| name | New rule |
Scenario: Delete a rule on site level
Given I log in as "admin"
- And I navigate to "Manage rules" node in "Site administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Site administration > Reports"
When I click on "Delete rule" "link"
Then I should see "Are you sure you want to delete rule \"New rule site level\"?"
And I press "Yes"
Scenario: Edit a rule on site level
Given I log in as "admin"
- And I navigate to "Manage rules" node in "Site administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Site administration > Reports"
When I click on "Edit rule" "link"
And I set the following fields to these values:
| name | New Rule Quiz |
Scenario: Duplicate a rule on site level
Given I log in as "admin"
- And I navigate to "Manage rules" node in "Site administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Site administration > Reports"
When I click on "Duplicate rule" "link"
Then I should see "Rule successfully duplicated"
And "#toolmonitorrules_r2" "css_element" should appear after "#toolmonitorrules_r1" "css_element"
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I follow "Course 1"
- And I navigate to "Manage rules" node in "Course administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Course administration > Reports"
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule course level |
| minutes | 1 |
| Message template | The course was viewed. {modulelink} |
And I press "Save changes"
- And I navigate to "Manage rules" node in "Site administration > Reports > Event monitor"
+ And I navigate to "Event monitoring rules" node in "Site administration > Reports"
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule site level |
Scenario: Subscribe to a rule on course level
Given I log in as "teacher1"
And I follow "Course 1"
- And I navigate to "Manage subscriptions" node in "Course administration > Reports > Event monitor"
+ And I navigate to "Event monitoring" node in "My profile settings"
+ And I set the field "courseid" to "Course 1"
When I set the field "cmid" to "All events"
Then I should see "Subscription successfully created"
And "#toolmonitorsubs_r0" "css_element" should exist
Scenario: Delete a subscription on course level
Given I log in as "teacher1"
And I follow "Course 1"
- And I navigate to "Manage subscriptions" node in "Course administration > Reports > Event monitor"
+ And I navigate to "Event monitoring" node in "My profile settings"
+ And I set the field "courseid" to "Course 1"
And I set the field "cmid" to "All events"
And I should see "Subscription successfully created"
When I click on "Delete subscription" "link"
Scenario: Subscribe to a rule on site level
Given I log in as "admin"
- And I navigate to "Manage subscriptions" node in "Site administration > Reports > Event monitor"
+ And I navigate to "Event monitoring" node in "My profile settings"
+ And I set the field "courseid" to "Site"
When I set the field "cmid" to "All events"
Then I should see "Subscription successfully created"
And "#toolmonitorsubs_r0" "css_element" should exist
Scenario: Delete a subscription on site level
Given I log in as "admin"
- And I navigate to "Manage subscriptions" node in "Site administration > Reports > Event monitor"
+ And I navigate to "Event monitoring" node in "My profile settings"
+ And I set the field "courseid" to "Site"
And I set the field "cmid" to "All events"
And I should see "Subscription successfully created"
And "#toolmonitorsubs_r0" "css_element" should exist
And I press "Update profile"
And I am on homepage
And I follow "Course 1"
- And I navigate to "Manage subscriptions" node in "Site administration > Reports > Event monitor"
+ And I navigate to "Event monitoring" node in "My profile settings"
+ And I set the field "courseid" to "Site"
And I set the field "cmid" to "All events"
And I should see "Subscription successfully created"
And "#toolmonitorsubs_r0" "css_element" should exist
And I press "Update profile"
And I am on homepage
And I follow "Course 1"
- And I navigate to "Manage subscriptions" node in "Course administration > Reports > Event monitor"
+ And I navigate to "Event monitoring" node in "My profile settings"
+ And I set the field "courseid" to "Course 1"
And I set the field "cmid" to "All events"
And I should see "Subscription successfully created"
And "#toolmonitorsubs_r0" "css_element" should exist