MDL-47922 behat: Add a behat test
authorAnkit Agarwal <ankit@moodle.com>
Mon, 3 Nov 2014 06:06:06 +0000 (11:36 +0530)
committerAnkit Agarwal <ankit@moodle.com>
Wed, 5 Nov 2014 04:49:45 +0000 (10:19 +0530)
admin/tool/monitor/tests/behat/disabled.feature [new file with mode: 0644]

diff --git a/admin/tool/monitor/tests/behat/disabled.feature b/admin/tool/monitor/tests/behat/disabled.feature
new file mode 100644 (file)
index 0000000..24dbea6
--- /dev/null
@@ -0,0 +1,20 @@
+@javascript @tool @tool_monitor
+Feature: Enable/disable managment of the event monitor
+  In order to manage event monitoring
+  As an admin
+  I need to enable/disable it
+
+  @javascript
+  Scenario: Tool is disabled by default.
+    Given I log in as "admin"
+    When I navigate to "Event monitoring rules" node in "Site administration > Reports"
+    Then I should see "Event monitoring is currently disabled"
+    And I should see "Enable"
+    And I should not see "Add a new rule"
+    And I click on "Enable" "link"
+    And I should see "Event monitoring is currently enabled"
+    And I should see "Disable"
+    And I should see "Add a new rule"
+    And I click on "Disable" "link"
+    And I should see "Event monitoring is currently disabled"
+    And I should not see "Add a new rule"