1 |
efrain |
1 |
@tool @tool_admin_presets @javascript
|
|
|
2 |
Feature: Admin preset deletion
|
|
|
3 |
|
|
|
4 |
Background: Create a preset to delete
|
|
|
5 |
Given I log in as "admin"
|
|
|
6 |
And the following "tool_admin_presets > preset" exist:
|
|
|
7 |
| name |
|
|
|
8 |
| Custom preset |
|
|
|
9 |
And I navigate to "Site admin presets" in site administration
|
|
|
10 |
|
|
|
11 |
Scenario: Core preset settings can't be deleted
|
|
|
12 |
Given I should see "Starter"
|
|
|
13 |
And I should see "Full"
|
|
|
14 |
And I should see "Custom preset"
|
|
|
15 |
When I open the action menu in "Custom preset" "table_row"
|
|
|
16 |
And I should see "Delete"
|
|
|
17 |
And I press the escape key
|
|
|
18 |
And I open the action menu in "Full" "table_row"
|
|
|
19 |
Then I should not see "Delete"
|
|
|
20 |
And I press the escape key
|
|
|
21 |
And I open the action menu in "Starter" "table_row"
|
|
|
22 |
And I should not see "Delete"
|
|
|
23 |
|
|
|
24 |
Scenario: Custom preset settings can be deleted
|
1441 |
ariadna |
25 |
When I press "Delete" action in the "Custom preset" report row
|
|
|
26 |
Then I should see "Are you sure you want to delete the site admin preset Custom preset?"
|
1 |
efrain |
27 |
And I should not see "This preset has been previously applied"
|
1441 |
ariadna |
28 |
And I click on "Cancel" "button" in the ".modal-dialog" "css_element"
|
1 |
efrain |
29 |
And I should see "Presets allow you to easily switch between different site admin configurations."
|
1441 |
ariadna |
30 |
And I press "Delete" action in the "Custom preset" report row
|
1 |
efrain |
31 |
And I should not see "This preset has been previously applied"
|
1441 |
ariadna |
32 |
And I click on "Delete" "button" in the ".modal-dialog" "css_element"
|
1 |
efrain |
33 |
And I should see "Presets allow you to easily switch between different site admin configurations."
|
1441 |
ariadna |
34 |
And I should not see "Custom preset" in the "reportbuilder-table" "table"
|
1 |
efrain |
35 |
|
|
|
36 |
Scenario: Delete preset that has been applied
|
1441 |
ariadna |
37 |
When I press "Review settings and apply" action in the "Custom preset" report row
|
1 |
efrain |
38 |
And I click on "Apply" "button"
|
|
|
39 |
And I navigate to "Site admin presets" in site administration
|
1441 |
ariadna |
40 |
And I press "Delete" action in the "Custom preset" report row
|
1 |
efrain |
41 |
And I should see "Are you sure you want to delete the site admin preset Custom preset?"
|
|
|
42 |
Then I should see "This preset has been previously applied"
|
1441 |
ariadna |
43 |
And I click on "Delete" "button" in the ".modal-dialog" "css_element"
|
1 |
efrain |
44 |
And I should see "Presets allow you to easily switch between different site admin configurations"
|
1441 |
ariadna |
45 |
And I should not see "Custom preset" in the "reportbuilder-table" "table"
|