| 1 |
Feature: Sudo rules manipulation |
| 2 |
Manage creation, search, enable/disable and deletion of Sudo rules |
| 3 |
|
| 4 |
@test |
| 5 |
Scenario: Add a new rule |
| 6 |
Given I am logged in as admin |
| 7 |
And I am on "sudo-rules" page |
| 8 |
|
| 9 |
When I click on the "sudo-rules-button-add" button |
| 10 |
Then I should see "add-sudo-rule-modal" modal |
| 11 |
|
| 12 |
When I type in the "modal-textbox-rule-name" textbox text "rule1" |
| 13 |
Then I should see "rule1" in the "modal-textbox-rule-name" textbox |
| 14 |
And I type in the "modal-textbox-description" textbox text "my description" |
| 15 |
Then I should see "my description" in the "modal-textbox-description" textbox |
| 16 |
When I click on the "modal-button-add" button |
| 17 |
Then I should not see "add-sudo-rule-modal" modal |
| 18 |
And I should see "add-sudorule-success" alert |
| 19 |
|
| 20 |
When I search for "rule1" in the data table |
| 21 |
Then I should see "rule1" entry in the data table with attribute "Description" set to "my description" |
| 22 |
|
| 23 |
@cleanup |
| 24 |
Scenario: Delete a rule |
| 25 |
Given I delete sudo rule "rule1" |
| 26 |
|
| 27 |
@seed |
| 28 |
Scenario: Create rules |
| 29 |
Given sudo rule "rule1" exists |
| 30 |
|
| 31 |
@test |
| 32 |
Scenario: Search for a rule |
| 33 |
Given I am logged in as admin |
| 34 |
And I am on "sudo-rules" page |
| 35 |
|
| 36 |
When I search for "rule1" in the data table |
| 37 |
Then I should see "rule1" entry in the data table |
| 38 |
|
| 39 |
@cleanup |
| 40 |
Scenario: Delete a rule |
| 41 |
Given I delete sudo rule "rule1" |
| 42 |
|
| 43 |
@seed |
| 44 |
Scenario: Create rule |
| 45 |
Given sudo rule "rule4" exists |
| 46 |
|
| 47 |
@test |
| 48 |
Scenario: Disable a rule |
| 49 |
Given I am logged in as admin |
| 50 |
And I am on "sudo-rules" page |
| 51 |
|
| 52 |
When I search for "rule4" in the data table |
| 53 |
Then I should see "rule4" entry in the data table |
| 54 |
|
| 55 |
When I select entry "rule4" in the data table |
| 56 |
Then I should see "rule4" entry selected in the data table |
| 57 |
When I click on the "sudo-rules-button-disable" button |
| 58 |
Then I should see "disable-enable-sudo-rules-modal" modal |
| 59 |
|
| 60 |
When I click on the "modal-button-disable" button |
| 61 |
Then I should not see "disable-enable-sudo-rules-modal" modal |
| 62 |
|
| 63 |
When I search for "rule4" in the data table |
| 64 |
Then I should see "rule4" entry in the data table |
| 65 |
And I should see "rule4" entry in the data table with attribute "Status" set to "Disabled" |
| 66 |
|
| 67 |
@cleanup |
| 68 |
Scenario: Delete a rule |
| 69 |
Given I delete sudo rule "rule4" |
| 70 |
|
| 71 |
@seed |
| 72 |
Scenario: Create rule |
| 73 |
Given sudo rule "rule4" exists |
| 74 |
And I disable sudo rule "rule4" |
| 75 |
|
| 76 |
@test |
| 77 |
Scenario: Re-enable a rule |
| 78 |
Given I am logged in as admin |
| 79 |
And I am on "sudo-rules" page |
| 80 |
|
| 81 |
When I search for "rule4" in the data table |
| 82 |
Then I should see "rule4" entry in the data table |
| 83 |
|
| 84 |
When I select entry "rule4" in the data table |
| 85 |
Then I should see "rule4" entry selected in the data table |
| 86 |
When I click on the "sudo-rules-button-enable" button |
| 87 |
Then I should see "disable-enable-sudo-rules-modal" modal |
| 88 |
|
| 89 |
When I click on the "modal-button-enable" button |
| 90 |
Then I should not see "disable-enable-sudo-rules-modal" modal |
| 91 |
|
| 92 |
When I search for "rule4" in the data table |
| 93 |
Then I should see "rule4" entry in the data table |
| 94 |
And I should see "rule4" entry in the data table with attribute "Status" set to "Enabled" |
| 95 |
|
| 96 |
@cleanup |
| 97 |
Scenario: Delete a rule |
| 98 |
Given I delete sudo rule "rule4" |
| 99 |
|
| 100 |
@seed |
| 101 |
Scenario: Create rule |
| 102 |
Given sudo rule "rule1" exists |
| 103 |
|
| 104 |
@test |
| 105 |
Scenario: Delete a rule |
| 106 |
Given I am logged in as admin |
| 107 |
And I am on "sudo-rules" page |
| 108 |
|
| 109 |
When I search for "rule1" in the data table |
| 110 |
Then I should see "rule1" entry in the data table |
| 111 |
|
| 112 |
When I select entry "rule1" in the data table |
| 113 |
Then I should see "rule1" entry selected in the data table |
| 114 |
When I click on the "sudo-rules-button-delete" button |
| 115 |
Then I should see "delete-sudo-rules-modal" modal |
| 116 |
|
| 117 |
When I click on the "modal-button-delete" button |
| 118 |
Then I should not see "delete-sudo-rules-modal" modal |
| 119 |
And I should see "remove-sudorules-success" alert |
| 120 |
|
| 121 |
When I search for "rule1" in the data table |
| 122 |
Then I should not see "rule1" entry in the data table |
| 123 |
|
| 124 |
@seed |
| 125 |
Scenario: Create rules |
| 126 |
Given sudo rule "rule2" exists |
| 127 |
And sudo rule "rule3" exists |
| 128 |
And sudo rule "rule4" exists |
| 129 |
|
| 130 |
@test |
| 131 |
Scenario: Delete many rules |
| 132 |
Given I am logged in as admin |
| 133 |
And I am on "sudo-rules" page |
| 134 |
|
| 135 |
When I search for "rule2" in the data table |
| 136 |
Then I should see "rule2" entry in the data table |
| 137 |
When I select entry "rule2" in the data table |
| 138 |
Then I should see "rule2" entry selected in the data table |
| 139 |
|
| 140 |
When I search for "rule3" in the data table |
| 141 |
Then I should see "rule3" entry in the data table |
| 142 |
When I select entry "rule3" in the data table |
| 143 |
Then I should see "rule3" entry selected in the data table |
| 144 |
|
| 145 |
When I search for "rule4" in the data table |
| 146 |
Then I should see "rule4" entry in the data table |
| 147 |
When I select entry "rule4" in the data table |
| 148 |
Then I should see "rule4" entry selected in the data table |
| 149 |
|
| 150 |
When I click on the "sudo-rules-button-delete" button |
| 151 |
Then I should see "delete-sudo-rules-modal" modal |
| 152 |
|
| 153 |
When I click on the "modal-button-delete" button |
| 154 |
Then I should not see "delete-sudo-rules-modal" modal |
| 155 |
And I should see "remove-sudorules-success" alert |
| 156 |
|
| 157 |
When I search for "rule2" in the data table |
| 158 |
Then I should not see "rule2" entry in the data table |
| 159 |
When I search for "rule3" in the data table |
| 160 |
Then I should not see "rule3" entry in the data table |
| 161 |
When I search for "rule4" in the data table |
| 162 |
Then I should not see "rule4" entry in the data table |
| 163 |
|
| 164 |
@test |
| 165 |
Scenario: Cancel creation of a rule |
| 166 |
Given I am logged in as admin |
| 167 |
And I am on "sudo-rules" page |
| 168 |
|
| 169 |
When I click on the "sudo-rules-button-add" button |
| 170 |
Then I should see "add-sudo-rule-modal" modal |
| 171 |
|
| 172 |
When I type in the "modal-textbox-rule-name" textbox text "rule-cancel" |
| 173 |
And I click on the "modal-button-cancel" button |
| 174 |
Then I should not see "add-sudo-rule-modal" modal |
| 175 |
|
| 176 |
When I search for "rule-cancel" in the data table |
| 177 |
Then I should not see "rule-cancel" entry in the data table |