Debian Codegraph @

install/freeipa-webui/cypress/e2e/hbac/hbac_rule/hbac_rule_settings.feature

raw
1 Feature: Hbac rule settings manipulation
2 Modify a Hbac rule
3
4 @seed
5 Scenario: Add a new rule
6 Given hbac rule "rule1" exists
7
8 @test
9 Scenario: Add user to Who category
10 Given I am logged in as admin
11 And I am on "hbac-rules/rule1" page
12
13 When I click on the "hbac-rules-tab-settings-tab-users" tab
14 Then I click on the "settings-button-add-user" button
15 Then I should see "dual-list-modal" modal
16
17 When I click on search link in dual list
18 Then I should see "item-admin" dual list item on the left
19
20 When I click on "item-admin" dual list item
21 Then I should see "item-admin" dual list item selected
22
23 When I click on the "dual-list-add-selected" button
24 Then I should see "item-admin" dual list item on the right
25 And I should see "item-admin" dual list item not selected
26
27 When I click on the "modal-button-add" button
28 Then I should not see "dual-list-modal" modal
29 And I should see "add-member-success" alert
30 Then I should see "admin" entry in the data table
31
32 @cleanup
33 Scenario: Delete the user for cleanup
34 Given I delete element "user" named "admin" from rule "rule1"
35
36 @seed
37 Scenario: Add a user to the rule
38 Given I have element "user" named "admin" in rule "rule1"
39
40 @test
41 Scenario: Remove user from Who category
42 Given I am logged in as admin
43 And I am on "hbac-rules/rule1" page
44
45 When I click on the "hbac-rules-tab-settings-tab-users" tab
46 Then I should see "admin" entry in the data table
47 When I select entry "admin" in the settings data table "user"
48 When I click on the "settings-button-delete-user" button
49 Then I should see "remove-hbac-rule-members-modal" modal
50 Then I should see "admin" entry in the data table
51 When I click on the "modal-button-delete" button
52 Then I should see "remove-member-success" alert
53 Then I should not see "admin" entry in the data table
54
55 @test
56 Scenario: Add group to Who category
57 Given I am logged in as admin
58 And I am on "hbac-rules/rule1" page
59
60 When I click on the "hbac-rules-tab-settings-tab-groups" tab
61 Then I click on the "settings-button-add-group" button
62 Then I should see "dual-list-modal" modal
63 When I click on search link in dual list
64 Then I should see "item-admins" dual list item on the left
65
66 When I click on "item-admins" dual list item
67 Then I should see "item-admins" dual list item selected
68
69 When I click on the "dual-list-add-selected" button
70 Then I should see "item-admins" dual list item on the right
71 And I should see "item-admins" dual list item not selected
72
73 When I click on the "modal-button-add" button
74 Then I should not see "dual-list-modal" modal
75 And I should see "add-member-success" alert
76 Then I should see "admins" entry in the data table
77
78 @cleanup
79 Scenario: Delete the group for cleanup
80 Given I delete element "group" named "admins" from rule "rule1"
81
82 @seed
83 Scenario: Add a group to the rule
84 Given I have element "group" named "admins" in rule "rule1"
85
86 @test
87 Scenario: Remove group from Who category
88 Given I am logged in as admin
89 And I am on "hbac-rules/rule1" page
90
91 When I click on the "hbac-rules-tab-settings-tab-groups" tab
92 Then I should see "admins" entry in the data table
93 When I select entry "admins" in the settings data table "group"
94 When I click on the "settings-button-delete-group" button
95 Then I should see "remove-hbac-rule-members-modal" modal
96 Then I should see "admins" entry in the data table
97 When I click on the "modal-button-delete" button
98 Then I should see "remove-member-success" alert
99 Then I should not see "admins" entry in the data table
100
101 @test
102 Scenario: Set User category to allow all users
103 # When enabling "Allow anyone" all members need to be removed otherwise
104 # the update fails
105 # 1) Add a user and group to the tables
106 Given I am logged in as admin
107 And I am on "hbac-rules/rule1" page
108 When I click on the "hbac-rules-tab-settings-tab-users" tab
109 Then I click on the "settings-button-add-user" button
110 Then I should see "dual-list-modal" modal
111 When I click on search link in dual list
112 Then I should see "item-admin" dual list item on the left
113
114 When I click on "item-admin" dual list item
115 Then I should see "item-admin" dual list item selected
116
117 When I click on the "dual-list-add-selected" button
118 Then I should see "item-admin" dual list item on the right
119 And I should see "item-admin" dual list item not selected
120
121 When I click on the "modal-button-add" button
122 Then I should not see "dual-list-modal" modal
123 And I should see "add-member-success" alert
124 Then I should see "admin" entry in the data table
125
126 When I click on the "hbac-rules-tab-settings-tab-groups" tab
127 Then I click on the "settings-button-add-group" button
128 Then I should see "dual-list-modal" modal
129 When I click on search link in dual list
130 Then I should see "item-admins" dual list item on the left
131
132 When I click on "item-admins" dual list item
133 Then I should see "item-admins" dual list item selected
134
135 When I click on the "dual-list-add-selected" button
136 Then I should see "item-admins" dual list item on the right
137 And I should see "item-admins" dual list item not selected
138
139 When I click on the "modal-button-add" button
140 Then I should not see "dual-list-modal" modal
141 And I should see "add-member-success" alert
142 Then I should see "admins" entry in the data table
143
144 When I click on the "hbac-rules-tab-settings-checkbox-usercategory" checkbox
145 Then I should not see "hbac-rules-tab-settings-tab-users" tab
146 Then I should not see "hbac-rules-tab-settings-tab-groups" tab
147
148 @seed
149 Scenario: Add a new host that will be used in the tests
150 Given host "my-new-host.ipa.test" exists
151
152 @test
153 Scenario: Add host to Host category
154 Given I am logged in as admin
155 And I am on "hbac-rules/rule1" page
156
157 When I click on the "hbac-rules-tab-settings-tab-hosts" tab
158 Then I click on the "settings-button-add-host" button
159 Then I should see "dual-list-modal" modal
160 When I click on search link in dual list
161 Then I should see "item-my-new-host.ipa.test" dual list item on the left
162
163 When I click on "item-my-new-host.ipa.test" dual list item
164 Then I should see "item-my-new-host.ipa.test" dual list item selected
165
166 When I click on the "dual-list-add-selected" button
167 Then I should see "item-my-new-host.ipa.test" dual list item on the right
168 And I should see "item-my-new-host.ipa.test" dual list item not selected
169
170 When I click on the "modal-button-add" button
171 Then I should not see "dual-list-modal" modal
172 And I should see "add-member-success" alert
173 Then I should see "my-new-host.ipa.test" entry in the data table
174
175 @cleanup
176 Scenario: Delete the host from the rule
177 Given I delete host "my-new-host" from rule "rule1"
178
179 @seed
180 Scenario: Add a host to the rule
181 Given I am logged in as admin
182 And I am on "hbac-rules/rule1" page
183
184 When I click on the "hbac-rules-tab-settings-tab-hosts" tab
185 Then I click on the "settings-button-add-host" button
186 Then I should see "dual-list-modal" modal
187 When I click on search link in dual list
188 Then I should see "item-my-new-host.ipa.test" dual list item on the left
189
190 When I click on "item-my-new-host.ipa.test" dual list item
191 Then I should see "item-my-new-host.ipa.test" dual list item selected
192
193 When I click on the "dual-list-add-selected" button
194 Then I should see "item-my-new-host.ipa.test" dual list item on the right
195 And I should see "item-my-new-host.ipa.test" dual list item not selected
196
197 When I click on the "modal-button-add" button
198 Then I should not see "dual-list-modal" modal
199 And I should see "add-member-success" alert
200 Then I should see "my-new-host.ipa.test" entry in the data table
201
202 @test
203 Scenario: Remove host from Host category
204 Given I am logged in as admin
205 And I am on "hbac-rules/rule1" page
206
207 When I click on the "hbac-rules-tab-settings-tab-hosts" tab
208 Then I should see "my-new-host.ipa.test" entry in the data table
209 When I select entry "my-new-host.ipa.test" in the settings data table "host"
210 When I click on the "settings-button-delete-host" button
211 Then I should see "remove-hbac-rule-members-modal" modal
212 Then I should see "my-new-host.ipa.test" entry in the data table
213 When I click on the "modal-button-delete" button
214 Then I should see "remove-member-success" alert
215 Then I should not see "my-new-host.ipa.test" entry in the data table
216
217 @test
218 Scenario: Add hostgroup to Host category
219 Given I am logged in as admin
220 And I am on "hbac-rules/rule1" page
221
222 When I click on the "hbac-rules-tab-settings-tab-hostgroups" tab
223 Then I click on the "settings-button-add-hostgroup" button
224 Then I should see "dual-list-modal" modal
225 When I click on search link in dual list
226 Then I should see "item-ipaservers" dual list item on the left
227
228 When I click on "item-ipaservers" dual list item
229 Then I should see "item-ipaservers" dual list item selected
230
231 When I click on the "dual-list-add-selected" button
232 Then I should see "item-ipaservers" dual list item on the right
233 And I should see "item-ipaservers" dual list item not selected
234
235 When I click on the "modal-button-add" button
236 Then I should not see "dual-list-modal" modal
237 And I should see "add-member-success" alert
238 Then I should see "ipaservers" entry in the data table
239
240 @cleanup
241 Scenario: Delete the hostgroup from the rule
242 Given I delete element "hostgroup" named "ipaservers" from rule "rule1"
243
244 @seed
245 Scenario: Add a hostgroup to the rule
246 Given I have element "hostgroup" named "ipaservers" in rule "rule1"
247
248 @test
249 Scenario: Remove hostgroup from Host category
250 Given I am logged in as admin
251 And I am on "hbac-rules/rule1" page
252
253 When I click on the "hbac-rules-tab-settings-tab-hostgroups" tab
254 Then I should see "ipaservers" entry in the data table
255 When I select entry "ipaservers" in the settings data table "hostgroup"
256 When I click on the "settings-button-delete-hostgroup" button
257 Then I should see "remove-hbac-rule-members-modal" modal
258 Then I should see "ipaservers" entry in the data table
259 When I click on the "modal-button-delete" button
260 Then I should see "remove-member-success" alert
261 Then I should not see "ipaservers" entry in the data table
262
263 @test
264 Scenario: Set Host category to allow all hosts
265 # This is the same test as above but for the host category
266 # 1) Add a host and host group to the tables
267 Given I am logged in as admin
268 And I am on "hbac-rules/rule1" page
269
270 When I click on the "hbac-rules-tab-settings-tab-hosts" tab
271 Then I click on the "settings-button-add-host" button
272 Then I should see "dual-list-modal" modal
273 When I click on search link in dual list
274 Then I should see "item-my-new-host.ipa.test" dual list item on the left
275
276 When I click on "item-my-new-host.ipa.test" dual list item
277 Then I should see "item-my-new-host.ipa.test" dual list item selected
278
279 When I click on the "dual-list-add-selected" button
280 Then I should see "item-my-new-host.ipa.test" dual list item on the right
281 And I should see "item-my-new-host.ipa.test" dual list item not selected
282
283 When I click on the "modal-button-add" button
284 Then I should not see "dual-list-modal" modal
285 And I should see "add-member-success" alert
286 Then I should see "my-new-host.ipa.test" entry in the data table
287
288 When I click on the "hbac-rules-tab-settings-tab-hostgroups" tab
289 Then I click on the "settings-button-add-hostgroup" button
290 Then I should see "dual-list-modal" modal
291 When I click on search link in dual list
292 Then I should see "item-ipaservers" dual list item on the left
293
294 When I click on "item-ipaservers" dual list item
295 Then I should see "item-ipaservers" dual list item selected
296
297 When I click on the "dual-list-add-selected" button
298 Then I should see "item-ipaservers" dual list item on the right
299 And I should see "item-ipaservers" dual list item not selected
300
301 When I click on the "modal-button-add" button
302 Then I should not see "dual-list-modal" modal
303 And I should see "add-member-success" alert
304 Then I should see "ipaservers" entry in the data table
305
306 # 2) Set the category to 'all'
307 When I click on the "hbac-rules-tab-settings-checkbox-hostcategory" checkbox
308 Then I should not see "hbac-rules-tab-settings-tab-hosts" tab
309 Then I should not see "hbac-rules-tab-settings-tab-hostgroups" tab
310
311 @cleanup
312 Scenario: Delete host for cleanup
313 Given I delete host "my-new-host.ipa.test"
314
315 @test
316 Scenario: Add service to Service category
317 Given I am logged in as admin
318 And I am on "hbac-rules/rule1" page
319
320 When I click on the "hbac-rules-tab-settings-tab-services" tab
321 Then I click on the "settings-button-add-hbacsvc" button
322 Then I should see "dual-list-modal" modal
323 When I click on search link in dual list
324 Then I should see "item-crond" dual list item on the left
325
326 When I click on "item-crond" dual list item
327 Then I should see "item-crond" dual list item selected
328
329 When I click on the "dual-list-add-selected" button
330 Then I should see "item-crond" dual list item on the right
331 And I should see "item-crond" dual list item not selected
332
333 When I click on the "modal-button-add" button
334 Then I should not see "dual-list-modal" modal
335 And I should see "add-member-success" alert
336 Then I should see "crond" entry in the data table
337
338 @cleanup
339 Scenario: Delete the service from the rule
340 Given I delete service "crond" from rule "rule1"
341
342 @seed
343 Scenario: Add a service to the rule
344 Given I have service "crond" in rule "rule1"
345
346 @test
347 Scenario: Remove service from Service category
348 Given I am logged in as admin
349 And I am on "hbac-rules/rule1" page
350
351 When I click on the "hbac-rules-tab-settings-tab-services" tab
352 Then I should see "crond" entry in the data table
353 When I select entry "crond" in the settings data table "hbacsvc"
354 When I click on the "settings-button-delete-hbacsvc" button
355 Then I should see "remove-hbac-rule-members-modal" modal
356 Then I should see "crond" entry in the data table
357 When I click on the "modal-button-delete" button
358 Then I should see "remove-member-success" alert
359 Then I should not see "crond" entry in the data table
360
361 @test
362 Scenario: Add service group to Service category
363 Given I am logged in as admin
364 And I am on "hbac-rules/rule1" page
365
366 When I click on the "hbac-rules-tab-settings-tab-servicegroups" tab
367 Then I click on the "settings-button-add-hbacsvcgroup" button
368 Then I should see "dual-list-modal" modal
369 When I click on search link in dual list
370 Then I should see "item-ftp" dual list item on the left
371
372 When I click on "item-ftp" dual list item
373 Then I should see "item-ftp" dual list item selected
374
375 When I click on the "dual-list-add-selected" button
376 Then I should see "item-ftp" dual list item on the right
377 And I should see "item-ftp" dual list item not selected
378
379 When I click on the "modal-button-add" button
380 Then I should not see "dual-list-modal" modal
381 And I should see "add-member-success" alert
382 Then I should see "ftp" entry in the data table
383
384 @cleanup
385 Scenario: Delete the service group from the rule
386 Given I delete servicegroup "ftp" from rule "rule1"
387
388 @seed
389 Scenario: Add a service group to the rule
390 Given I have servicegroup "ftp" in rule "rule1"
391
392 @test
393 Scenario: Remove service group from Service category
394 Given I am logged in as admin
395 And I am on "hbac-rules/rule1" page
396
397 When I click on the "hbac-rules-tab-settings-tab-servicegroups" tab
398 Then I should see "ftp" entry in the data table
399 When I select entry "ftp" in the settings data table "hbacsvcgroup"
400 When I click on the "settings-button-delete-hbacsvcgroup" button
401 Then I should see "remove-hbac-rule-members-modal" modal
402 Then I should see "ftp" entry in the data table
403 When I click on the "modal-button-delete" button
404 Then I should see "remove-member-success" alert
405 Then I should not see "ftp" entry in the data table
406
407 @test
408 Scenario: Set Service category to allow all services
409 # 1) Add a service and service group to the tables
410 Given I am logged in as admin
411 And I am on "hbac-rules/rule1" page
412
413 When I click on the "hbac-rules-tab-settings-tab-services" tab
414 Then I click on the "settings-button-add-hbacsvc" button
415 Then I should see "dual-list-modal" modal
416 When I click on search link in dual list
417 Then I should see "item-crond" dual list item on the left
418
419 When I click on "item-crond" dual list item
420 Then I should see "item-crond" dual list item selected
421
422 When I click on the "dual-list-add-selected" button
423 Then I should see "item-crond" dual list item on the right
424 And I should see "item-crond" dual list item not selected
425
426 When I click on the "modal-button-add" button
427 Then I should not see "dual-list-modal" modal
428 And I should see "add-member-success" alert
429 Then I should see "crond" entry in the data table
430
431 When I click on the "hbac-rules-tab-settings-tab-servicegroups" tab
432 Then I click on the "settings-button-add-hbacsvcgroup" button
433 Then I should see "dual-list-modal" modal
434 When I click on search link in dual list
435 Then I should see "item-ftp" dual list item on the left
436
437 When I click on "item-ftp" dual list item
438 Then I should see "item-ftp" dual list item selected
439
440 When I click on the "dual-list-add-selected" button
441 Then I should see "item-ftp" dual list item on the right
442 And I should see "item-ftp" dual list item not selected
443
444 When I click on the "modal-button-add" button
445 Then I should not see "dual-list-modal" modal
446 And I should see "add-member-success" alert
447 Then I should see "ftp" entry in the data table
448
449 When I click on the "hbac-rules-tab-settings-checkbox-servicecategory" checkbox
450 Then I should not see "hbac-rules-tab-settings-tab-services" tab
451 Then I should not see "hbac-rules-tab-settings-tab-servicegroups" tab
452
453 @cleanup
454 Scenario: Delete the HBAC rule for cleanup
455 Given I delete hbac rule "rule1"