MDL-48841 admin: Behat table row should start with first row
[moodle.git] / admin / tool / task / tests / behat / manage_tasks.feature
blob73fc27dd61b40be089e5cd17454007d07cf73497
1 @tool @tool_task @javascript
2 Feature: Manage scheduled tasks
3   In order to configure scheduled tasks
4   As an admin
5   I need to be able to disable, enable, edit and reset to default scheduled tasks
7   Background:
8     Given I log in as "admin"
9     And I navigate to "Scheduled tasks" node in "Site administration > Server"
11   Scenario: Disable scheduled task
12     When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row"
13     Then I should see "Edit task schedule: Log table cleanup"
14     And I set the following fields to these values:
15       | disabled             | 1 |
16     And I press "Save changes"
17     Then I should see "Changes saved"
18     And I should see "Task disabled" in the "Log table cleanup" "table_row"
20   Scenario: Enable scheduled task
21     When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row"
22     Then I should see "Edit task schedule: Log table cleanup"
23     And I set the following fields to these values:
24       | disabled             | 0 |
25     And I press "Save changes"
26     Then I should see "Changes saved"
27     And I should not see "Task disabled" in the "Log table cleanup" "table_row"
29   Scenario: Edit scheduled task
30     When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row"
31     Then I should see "Edit task schedule: Log table cleanup"
32     And I set the following fields to these values:
33       | minute               | */5 |
34       | hour                 | 1   |
35       | day                  | 2   |
36       | month                | 3   |
37       | dayofweek            | 4   |
38     And I press "Save changes"
39     Then I should see "Changes saved"
40     And the following should exist in the "admintable" table:
41       | Component    | Minute | Hour | Day | Day of week | Month |
42       | Standard log | */5    | 1    | 2   | 4           | 3     |
44   Scenario: Reset scheduled task to default
45     When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row"
46     Then I should see "Edit task schedule: Log table cleanup"
47     And I set the following fields to these values:
48       | resettodefaults      | 1   |
49     And I press "Save changes"
50     Then I should see "Changes saved"
51     And the following should not exist in the "admintable" table:
52       | Name               | Component    | Minute | Hour | Day | Day of week | Month |
53       | Log table cleanup  | Standard log | */5    | 1    | 2   | 4           | 3     |