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
|
|
|
25 |
Given I should see "Custom preset"
|
|
|
26 |
And I open the action menu in "Custom preset" "table_row"
|
|
|
27 |
When I choose "Delete" in the open action menu
|
|
|
28 |
And I should see "Are you sure you want to delete the site admin preset Custom preset?"
|
|
|
29 |
And I should not see "This preset has been previously applied"
|
|
|
30 |
And I click on "Cancel" "button"
|
|
|
31 |
And I should see "Presets allow you to easily switch between different site admin configurations."
|
|
|
32 |
And "Custom preset" "table_row" should exist
|
|
|
33 |
And I open the action menu in "Custom preset" "table_row"
|
|
|
34 |
And I choose "Delete" in the open action menu
|
|
|
35 |
And I should not see "This preset has been previously applied"
|
|
|
36 |
And I click on "Delete" "button"
|
|
|
37 |
And I should see "Presets allow you to easily switch between different site admin configurations."
|
|
|
38 |
Then "Custom preset" "table_row" should not exist
|
|
|
39 |
|
|
|
40 |
Scenario: Delete preset that has been applied
|
|
|
41 |
Given I open the action menu in "Custom preset" "table_row"
|
|
|
42 |
And I choose "Review settings and apply" in the open action menu
|
|
|
43 |
And I click on "Apply" "button"
|
|
|
44 |
And I navigate to "Site admin presets" in site administration
|
|
|
45 |
When I open the action menu in "Custom preset" "table_row"
|
|
|
46 |
And I choose "Delete" in the open action menu
|
|
|
47 |
And I should see "Are you sure you want to delete the site admin preset Custom preset?"
|
|
|
48 |
Then I should see "This preset has been previously applied"
|
|
|
49 |
And I click on "Delete" "button"
|
|
|
50 |
And I should see "Presets allow you to easily switch between different site admin configurations"
|
|
|
51 |
And "Custom preset" "table_row" should not exist
|