MDL-45758 tool_monitor: Update behat tests

This commit is contained in:
Ankit Agarwal
2014-10-15 13:59:19 +05:30
parent ffe9ed541c
commit d6e0e275dd
2 changed files with 25 additions and 19 deletions
+11 -11
View File
@@ -1,4 +1,4 @@
@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
@@ -16,7 +16,7 @@ Feature: tool_monitor_rule
| 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 |
@@ -27,7 +27,7 @@ Feature: tool_monitor_rule
| 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 |
@@ -44,7 +44,7 @@ Feature: tool_monitor_rule
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 |
@@ -64,7 +64,7 @@ Feature: tool_monitor_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"
@@ -74,7 +74,7 @@ Feature: tool_monitor_rule
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 |
@@ -93,7 +93,7 @@ Feature: tool_monitor_rule
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"
@@ -105,7 +105,7 @@ Feature: tool_monitor_rule
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 |
@@ -124,7 +124,7 @@ Feature: tool_monitor_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"
@@ -133,7 +133,7 @@ Feature: tool_monitor_rule
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 |
@@ -151,7 +151,7 @@ Feature: tool_monitor_rule
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"
@@ -16,7 +16,7 @@ Feature: tool_monitor_subscriptions
| 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 |
@@ -27,7 +27,7 @@ Feature: tool_monitor_subscriptions
| 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 |
@@ -43,7 +43,8 @@ Feature: tool_monitor_subscriptions
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
@@ -51,7 +52,8 @@ Feature: tool_monitor_subscriptions
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"
@@ -62,14 +64,16 @@ Feature: tool_monitor_subscriptions
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
@@ -86,7 +90,8 @@ Feature: tool_monitor_subscriptions
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
@@ -105,7 +110,8 @@ Feature: tool_monitor_subscriptions
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