Debian Codegraph @

install/freeipa-webui/cypress/e2e/users/users.feature

raw
1 Feature: User manipulation
2 Create, disable, delete, preserve and activate users
3
4 @test
5 Scenario Outline: Add a new user
6 Given I am logged in as admin
7
8 When I create user "<userLogin>" "<firstName>" "<lastName>" with password "<password>"
9 Then I should see "add-user-success" alert
10
11 When I search for "<userLogin>" in the data table
12 Then I should see "<userLogin>" entry in the data table
13
14 Examples:
15 | userLogin | firstName | lastName | password |
16 | testuser1 | Arthur | Dent | ILoveKlingonPoetry42 |
17 | testuser2 | Banana | Bread | FishAndChips097 |
18 | testuser3 | Cypress | Gateway | TestingIsFun73 |
19
20 @cleanup
21 Scenario: Delete users
22 Given I delete user "testuser1"
23 And I delete user "testuser2"
24 And I delete user "testuser3"
25
26 @seed
27 Scenario: Create user "jdoe"
28 Given User "jdoe" "John" "Doe" exists and is using password "Secret123"
29
30 @test
31 Scenario: Delete a user
32 Given I am logged in as admin
33
34 When I search for "jdoe" in the data table
35 Then I should see "jdoe" entry in the data table
36
37 When I select entry "jdoe" in the data table
38 Then I should see "jdoe" entry selected in the data table
39
40 When I click on the "active-users-button-delete" button
41 Then I should see "delete-users-modal" modal
42
43 When I click on the "modal-radio-delete" radio button
44 Then I should see the "modal-radio-delete" radio button is selected
45
46 When I click on the "modal-button-delete" button
47 Then I should not see "delete-users-modal" modal
48
49 When I search for "jdoe" in the data table
50 Then I should not see "jdoe" entry in the data table
51
52 @seed
53 Scenario: Create user "jdoe"
54 Given User "jdoe" "John" "Doe" exists and is using password "Secret123"
55
56 @test
57 Scenario: Preserve a user
58 Given I am logged in as admin
59
60 When I search for "jdoe" in the data table
61 Then I should see "jdoe" entry in the data table
62
63 When I select entry "jdoe" in the data table
64 Then I should see "jdoe" entry selected in the data table
65
66 When I click on the "active-users-button-delete" button
67 Then I should see "delete-users-modal" modal
68
69 When I click on the "modal-radio-preserve" radio button
70 Then I should see the "modal-radio-preserve" radio button is selected
71 And I should see "preserve-users-modal" modal
72
73 When I click on the "modal-button-preserve" button
74 Then I should not see "preserve-users-modal" modal
75
76 When I search for "jdoe" in the data table
77 Then I should not see "jdoe" entry in the data table
78
79 When I navigate to "preserved-users" page
80 Then I should be on "preserved-users" page
81
82 When I search for "jdoe" in the data table
83 Then I should see "jdoe" entry in the data table
84
85 @cleanup
86 Scenario: Delete users
87 Given I delete preserved user "jdoe"
88
89 @seed
90 Scenario: Create preserved user "jdoe"
91 Given Preserved user "jdoe" "John" "Doe" exists and is using password "Secret123"
92
93 @test
94 Scenario: Restore preserved user
95 Given I am logged in as admin
96 Given I am on "preserved-users" page
97
98 When I search for "jdoe" in the data table
99 Then I should see "jdoe" entry in the data table
100
101 When I select entry "jdoe" in the data table
102 Then I should see "jdoe" entry selected in the data table
103
104 When I click on the "preserved-users-button-restore" button
105 Then I should see "restore-preserved-users-modal" modal
106
107 When I click on the "modal-button-restore" button
108 Then I should not see "restore-preserved-users-modal" modal
109
110 When I search for "jdoe" in the data table
111 Then I should not see "jdoe" entry in the data table
112
113 When I navigate to "active-users" page
114 Then I should be on "active-users" page
115
116 When I search for "jdoe" in the data table
117 Then I should see "jdoe" entry in the data table
118
119 @cleanup
120 Scenario: Delete user
121 Given I delete user "jdoe"
122
123 @seed
124 Scenario: Create user "jdoe"
125 Given User "jdoe" "John" "Doe" exists and is using password "Secret123"
126
127 @test
128 Scenario: Disable a user
129 Given I am logged in as admin
130
131 When I search for "jdoe" in the data table
132 Then I should see "jdoe" entry in the data table
133
134 When I select entry "jdoe" in the data table
135 Then I should see "jdoe" entry selected in the data table
136
137 When I click on the "active-users-button-disable" button
138 Then I should see "disable-users-modal" modal
139
140 When I click on the "modal-button-disable" button
141 Then I should not see "disable-users-modal" modal
142
143 When I search for "jdoe" in the data table
144 Then I should see "jdoe" entry in the data table
145 And I should see "jdoe" user in the data table disabled
146
147 @cleanup
148 Scenario: Delete user
149 Given I delete user "jdoe"
150
151 @seed
152 Scenario: Create disabled user "jdoe"
153 Given Disabled user "jdoe" "John" "Doe" exists and is using password "Secret123"
154
155 @test
156 Scenario: Re-enable a user
157 Given I am logged in as admin
158
159 When I search for "jdoe" in the data table
160 Then I should see "jdoe" entry in the data table
161
162 When I select entry "jdoe" in the data table
163 Then I should see "jdoe" entry selected in the data table
164
165 When I click on the "active-users-button-enable" button
166 Then I should see "enable-users-modal" modal
167
168 When I click on the "modal-button-enable" button
169 Then I should not see "enable-users-modal" modal
170
171 When I search for "jdoe" in the data table
172 Then I should see "jdoe" entry in the data table
173 And I should see "jdoe" user in the data table enabled
174
175 @cleanup
176 Scenario: Delete user
177 Given I delete user "jdoe"
178
179 @seed
180 Scenario: Create users
181 Given User "jdoe" "John" "Doe" exists and is using password "Secret123"
182 And User "adoe" "Adam" "Doe" exists and is using password "Secret123"
183
184 @test
185 Scenario: Disable multiple users at once
186 Given I am logged in as admin
187
188 When I search for "jdoe" in the data table
189 Then I should see "jdoe" entry in the data table
190
191 When I select entry "jdoe" in the data table
192 Then I should see "jdoe" entry selected in the data table
193
194 When I search for "adoe" in the data table
195 Then I should see "adoe" entry in the data table
196
197 When I select entry "adoe" in the data table
198 Then I should see "adoe" entry selected in the data table
199
200 When I click on the "active-users-button-disable" button
201 Then I should see "disable-users-modal" modal
202
203 When I click on the "modal-button-disable" button
204 Then I should not see "disable-users-modal" modal
205
206 When I search for "jdoe" in the data table
207 Then I should see "jdoe" entry in the data table
208 And I should see "jdoe" user in the data table disabled
209
210 When I search for "adoe" in the data table
211 Then I should see "adoe" entry in the data table
212 And I should see "adoe" user in the data table disabled
213
214 @cleanup
215 Scenario: Delete users
216 Given I delete user "jdoe"
217 And I delete user "adoe"
218
219 @seed
220 Scenario: Create disabled users
221 Given Disabled user "jdoe" "John" "Doe" exists and is using password "Secret123"
222 And Disabled user "adoe" "Adam" "Doe" exists and is using password "Secret123"
223
224 @test
225 Scenario: Re-enable multiple users at once
226 Given I am logged in as admin
227
228 When I search for "jdoe" in the data table
229 Then I should see "jdoe" entry in the data table
230
231 When I select entry "jdoe" in the data table
232 Then I should see "jdoe" entry selected in the data table
233
234 When I search for "adoe" in the data table
235 Then I should see "adoe" entry in the data table
236
237 When I select entry "adoe" in the data table
238 Then I should see "adoe" entry selected in the data table
239
240 When I click on the "active-users-button-enable" button
241 Then I should see "enable-users-modal" modal
242
243 When I click on the "modal-button-enable" button
244 Then I should not see "enable-users-modal" modal
245
246 When I search for "jdoe" in the data table
247 Then I should see "jdoe" entry in the data table
248 And I should see "jdoe" user in the data table enabled
249
250 When I search for "adoe" in the data table
251 Then I should see "adoe" entry in the data table
252 And I should see "adoe" user in the data table enabled
253
254 @cleanup
255 Scenario: Delete users
256 Given I delete user "jdoe"
257 And I delete user "adoe"
258
259 @test
260 Scenario: Try to delete admin user
261 Given I am logged in as admin
262
263 When I search for "admin" in the data table
264 Then I should see "admin" entry in the data table
265
266 When I select entry "admin" in the data table
267 Then I should see "admin" entry selected in the data table
268
269 When I click on the "active-users-button-delete" button
270 Then I should see "delete-users-modal" modal
271
272 When I click on the "modal-radio-delete" radio button
273 Then I should see the "modal-radio-delete" radio button is selected
274
275 When I click on the "modal-button-delete" button
276 # Spawning overlaying modals is a bad practice!
277 # Instead of clicking through the modals, we just redirect
278 Then I should see "delete-users-modal-error" modal
279
280 When I navigate to "active-users" page
281 Then I should be on "active-users" page
282
283 When I search for "admin" in the data table
284 Then I should see "admin" entry in the data table
285
286 @test
287 Scenario: Try to preserve admin user
288 Given I am logged in as admin
289
290 When I search for "admin" in the data table
291 Then I should see "admin" entry in the data table
292
293 When I select entry "admin" in the data table
294 Then I should see "admin" entry selected in the data table
295
296 When I click on the "active-users-button-delete" button
297 Then I should see "delete-users-modal" modal
298
299 When I click on the "modal-radio-preserve" radio button
300 Then I should see the "modal-radio-preserve" radio button is selected
301 And I should see "preserve-users-modal" modal
302
303 When I click on the "modal-button-preserve" button
304 # Spawning overlaying modals is a bad practice!
305 # Instead of clicking through the modals, we just redirect
306 Then I should see "preserve-users-modal" modal
307
308 When I navigate to "active-users" page
309 Then I should be on "active-users" page
310
311 When I search for "admin" in the data table
312 Then I should see "admin" entry in the data table
313
314 @test
315 Scenario: Cancel creation of a user
316 Given I am logged in as admin
317
318 When I search for "jdoe" in the data table
319 Then I should not see "jdoe" entry in the data table
320
321 When I click on the "active-users-button-add" button
322 Then I should see "add-user-modal" modal
323
324 When I type in the "modal-textbox-login" textbox text "jdoe"
325 Then I should see "jdoe" in the "modal-textbox-login" textbox
326
327 When I type in the "modal-textbox-first-name" textbox text "Joe"
328 Then I should see "Joe" in the "modal-textbox-first-name" textbox
329
330 When I type in the "modal-textbox-last-name" textbox text "Doe"
331 Then I should see "Doe" in the "modal-textbox-last-name" textbox
332
333 When I type in the "modal-textbox-new-password" textbox text "Secret123"
334 Then I should see "Secret123" in the "modal-textbox-new-password" textbox
335
336 When I type in the "modal-textbox-verify-password" textbox text "Secret123"
337 Then I should see "Secret123" in the "modal-textbox-verify-password" textbox
338
339 When I click on the "modal-button-cancel" button
340 Then I should not see "add-user-modal" modal
341
342 When I search for "jdoe" in the data table
343 Then I should not see "jdoe" entry in the data table
344
345 @test
346 Scenario: Create a user without password
347 Given I am logged in as admin
348
349 When I search for "jdoe" in the data table
350 Then I should not see "jdoe" entry in the data table
351
352 When I click on the "active-users-button-add" button
353 Then I should see "add-user-modal" modal
354
355 When I type in the "modal-textbox-login" textbox text "jdoe"
356 Then I should see "jdoe" in the "modal-textbox-login" textbox
357
358 When I type in the "modal-textbox-first-name" textbox text "Joe"
359 Then I should see "Joe" in the "modal-textbox-first-name" textbox
360
361 When I type in the "modal-textbox-last-name" textbox text "Doe"
362 Then I should see "Doe" in the "modal-textbox-last-name" textbox
363
364 When I click on the "modal-button-add" button
365 Then I should not see "add-user-modal" modal
366
367 When I search for "jdoe" in the data table
368 Then I should see "jdoe" entry in the data table
369
370 @cleanup
371 Scenario: Delete user
372 Given I delete user "jdoe"
373
374 @test
375 Scenario: Rebuild auto membership
376 Given I am logged in as admin
377
378 When I click on the "active-users-kebab" kebab menu
379 Then I should see "active-users-kebab" kebab menu expanded
380
381 When I click on the "active-users-kebab-rebuild-auto-membership" button
382 Then I should see "rebuild-auto-membership-modal" modal
383
384 When I click on the "modal-button-ok" button
385 Then I should see "rebuild-automember-success" alert