1441 |
ariadna |
1 |
@core @core_cohort
|
|
|
2 |
Feature: Delete cohorts
|
|
|
3 |
In order to delete cohorts
|
|
|
4 |
As an admin
|
|
|
5 |
I need to select specific cohorts and perform that action
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "cohorts" exist:
|
|
|
9 |
| name | idnumber | contextlevel | reference | description |
|
|
|
10 |
| Cohort 1 | cohort1 | System | | About cohort 1 |
|
|
|
11 |
| Cohort 2 | cohort2 | System | | About cohort 2 |
|
|
|
12 |
| Cohort 3 | cohort3 | System | | About cohort 3 |
|
|
|
13 |
|
|
|
14 |
@javascript
|
|
|
15 |
Scenario: Delete single cohort
|
|
|
16 |
Given I log in as "admin"
|
|
|
17 |
And I navigate to "Users > Accounts > Cohorts" in site administration
|
|
|
18 |
And the following should exist in the "Cohorts" table:
|
|
|
19 |
| Name | Cohort ID |
|
|
|
20 |
| Cohort 1 | cohort1 |
|
|
|
21 |
| Cohort 2 | cohort2 |
|
|
|
22 |
| Cohort 3 | cohort3 |
|
|
|
23 |
When I press "Delete" action in the "Cohort 1" report row
|
|
|
24 |
Then I should see "This will delete cohort 'Cohort 1' and all associated data." in the "Delete selected" "dialogue"
|
|
|
25 |
And I click on "Delete" "button" in the "Delete selected" "dialogue"
|
|
|
26 |
And I should see "Deleted cohort"
|
|
|
27 |
And I should not see "Cohort 1" in the "Cohorts" "table"
|
|
|
28 |
And I should see "Cohort 2" in the "Cohorts" "table"
|
|
|
29 |
And I should see "Cohort 3" in the "Cohorts" "table"
|
|
|
30 |
|
|
|
31 |
@javascript
|
|
|
32 |
Scenario: Delete multiple cohorts
|
|
|
33 |
Given I log in as "admin"
|
|
|
34 |
And I navigate to "Users > Accounts > Cohorts" in site administration
|
|
|
35 |
And the following should exist in the "Cohorts" table:
|
|
|
36 |
| Name | Cohort ID |
|
|
|
37 |
| Cohort 1 | cohort1 |
|
|
|
38 |
| Cohort 2 | cohort2 |
|
|
|
39 |
| Cohort 3 | cohort3 |
|
|
|
40 |
When I click on "Select 'Cohort 1'" "checkbox"
|
|
|
41 |
And I click on "Select 'Cohort 2'" "checkbox"
|
|
|
42 |
And I click on "Delete selected" "button"
|
|
|
43 |
Then I should see "This will delete the cohorts and all associated data." in the "Delete selected" "dialogue"
|
|
|
44 |
And I click on "Delete" "button" in the "Delete selected" "dialogue"
|
|
|
45 |
And I should see "Deleted selected cohorts"
|
|
|
46 |
And I should not see "Cohort 1" in the "Cohorts" "table"
|
|
|
47 |
And I should not see "Cohort 2" in the "Cohorts" "table"
|
|
|
48 |
And I should see "Cohort 3" in the "Cohorts" "table"
|