Debian Codegraph @

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

raw
1 Feature: Host manipulation
2 Create, and delete hosts
3
4 @test
5 Scenario: Add a new host
6 Given I am logged in as admin
7 And I am on "hosts" page
8
9 When I click on the "hosts-button-add" button
10 Then I should see "add-host-modal" modal
11
12 When I type in the "modal-textbox-host-name" textbox text "myfirstserver.ipa.test"
13 Then I should see "myfirstserver.ipa.test" in the "modal-textbox-host-name" textbox
14
15 When I click on the "modal-checkbox-force-host" checkbox
16 Then I should see the "modal-checkbox-force-host" checkbox is checked
17
18 When I click on the "modal-button-add" button
19 Then I should not see "add-host-modal" modal
20 And I should see "add-host-success" alert
21
22 When I search for "myfirstserver.ipa.test" in the data table
23 Then I should see "myfirstserver.ipa.test" entry in the data table
24
25 @cleanup
26 Scenario: Delete a host
27 Given I delete host "myfirstserver.ipa.test"
28
29 @test
30 Scenario: Add a new host with all fields set
31 Given I am logged in as admin
32 And I am on "hosts" page
33
34 When I click on the "hosts-button-add" button
35 Then I should see "add-host-modal" modal
36
37 When I type in the "modal-textbox-host-name" textbox text "myfirstserver.ipa.test"
38 Then I should see "myfirstserver.ipa.test" in the "modal-textbox-host-name" textbox
39
40 When I type in the "modal-textbox-host-description" textbox text "my description"
41 Then I should see "my description" in the "modal-textbox-host-description" textbox
42
43 When I type in the "modal-textbox-host-class" textbox text "test class"
44 Then I should see "test class" in the "modal-textbox-host-class" textbox
45
46 When I click on the "modal-checkbox-force-host" checkbox
47 Then I should see the "modal-checkbox-force-host" checkbox is checked
48
49 When I click on the "modal-button-add" button
50 Then I should not see "add-host-modal" modal
51 And I should see "add-host-success" alert
52
53 When I search for "myfirstserver.ipa.test" in the data table
54 Then I should see "myfirstserver.ipa.test" entry in the data table
55
56 @cleanup
57 Scenario: Delete a host
58 Given I delete host "myfirstserver.ipa.test"
59
60 @test
61 Scenario: Add a new host with all checkboxes set
62 Given I am logged in as admin
63 And I am on "hosts" page
64
65 When I click on the "hosts-button-add" button
66 Then I should see "add-host-modal" modal
67
68 When I type in the "modal-textbox-host-name" textbox text "myfirstserver.ipa.test"
69 Then I should see "myfirstserver.ipa.test" in the "modal-textbox-host-name" textbox
70
71 When I type in the "modal-textbox-host-description" textbox text "my description"
72 Then I should see "my description" in the "modal-textbox-host-description" textbox
73
74 When I type in the "modal-textbox-host-class" textbox text "test class"
75 Then I should see "test class" in the "modal-textbox-host-class" textbox
76
77 When I click on the "modal-checkbox-force-host" checkbox
78 Then I should see the "modal-checkbox-force-host" checkbox is checked
79
80 When I click on the "modal-checkbox-generate-otp" checkbox
81 Then I should see the "modal-checkbox-generate-otp" checkbox is checked
82
83 When I click on the "modal-checkbox-suppress-membership" checkbox
84 Then I should see the "modal-checkbox-suppress-membership" checkbox is checked
85
86 When I click on the "modal-button-add" button
87 Then I should not see "add-host-modal" modal
88 And I should see "add-host-success" alert
89
90 When I search for "myfirstserver.ipa.test" in the data table
91 Then I should see "myfirstserver.ipa.test" entry in the data table
92
93 @cleanup
94 Scenario: Delete a host
95 Given I delete host "myfirstserver.ipa.test"
96
97 @test
98 Scenario: Add a new host with 'Force' unchecked is expected to fail
99 Given I am logged in as admin
100 And I am on "hosts" page
101
102 When I click on the "hosts-button-add" button
103 Then I should see "add-host-modal" modal
104
105 When I type in the "modal-textbox-host-name" textbox text "forcehost.ipa.test"
106 Then I should see "forcehost.ipa.test" in the "modal-textbox-host-name" textbox
107
108 When I click on the "modal-button-add" button
109 Then I should see "add-host-modal-error" modal
110
111 When I click on the "modal-button-cancel" button
112 Then I should not see "add-host-modal-error" modal
113 And I should see "add-host-modal" modal
114
115 When I click on the "modal-button-cancel" button
116 Then I should not see "add-host-modal" modal
117
118 When I search for "forcehost.ipa.test" in the data table
119 Then I should not see "forcehost.ipa.test" entry in the data table
120
121 @test
122 Scenario: Rebuild auto membership
123 Given I am logged in as admin
124 And I am on "hosts" page
125
126 When I click on the "hosts-kebab" kebab menu
127 Then I should see "hosts-kebab" kebab menu expanded
128
129 When I click on the "hosts-kebab-rebuild-auto-membership" button
130 Then I should see "hosts-rebuild-auto-membership-modal" modal
131
132 When I click on the "modal-button-ok" button
133 Then I should not see "hosts-rebuild-auto-membership-modal" modal
134 And I should see "rebuild-automember-success" alert
135
136 @seed
137 Scenario: Create hosts
138 Given host "myfirstserver.ipa.test" exists
139
140 @test
141 Scenario: Delete a host
142 Given I am logged in as admin
143 And I am on "hosts" page
144
145 When I select entry "myfirstserver.ipa.test" in the data table
146 Then I should see "myfirstserver.ipa.test" entry selected in the data table
147
148 When I click on the "hosts-button-delete" button
149 Then I should see "delete-hosts-modal" modal
150
151 When I click on the "modal-button-delete" button
152 Then I should not see "delete-hosts-modal" modal
153 And I should see "remove-hosts-success" alert
154
155 When I search for "myfirstserver.ipa.test" in the data table
156 Then I should not see "myfirstserver.ipa.test" entry in the data table
157
158 @seed
159 Scenario: Create hosts
160 Given host "myfirstserver.ipa.test" exists
161 And host "mysecondserver.ipa.test" exists
162
163 @test
164 Scenario: Delete many hosts
165 Given I am logged in as admin
166 And I am on "hosts" page
167
168 When I select entry "myfirstserver.ipa.test" in the data table
169 Then I should see "myfirstserver.ipa.test" entry selected in the data table
170
171 When I select entry "mysecondserver.ipa.test" in the data table
172 Then I should see "mysecondserver.ipa.test" entry selected in the data table
173
174 When I click on the "hosts-button-delete" button
175 Then I should see "delete-hosts-modal" modal
176
177 When I click on the "modal-button-delete" button
178 Then I should not see "delete-hosts-modal" modal
179 And I should see "remove-hosts-success" alert
180
181 When I search for "myfirstserver.ipa.test" in the data table
182 Then I should not see "myfirstserver.ipa.test" entry in the data table
183
184 When I search for "mysecondserver.ipa.test" in the data table
185 Then I should not see "mysecondserver.ipa.test" entry in the data table
186
187 @test
188 Scenario: Cancel creation of a host
189 Given I am logged in as admin
190 And I am on "hosts" page
191
192 When I click on the "hosts-button-add" button
193 Then I should see "add-host-modal" modal
194
195 When I type in the "modal-textbox-host-name" textbox text "myfirstserver.ipa.test"
196 Then I should see "myfirstserver.ipa.test" in the "modal-textbox-host-name" textbox
197
198 When I click on the "modal-checkbox-force-host" checkbox
199 Then I should see the "modal-checkbox-force-host" checkbox is checked
200
201 When I click on the "modal-button-cancel" button
202 Then I should not see "add-host-modal" modal
203
204 When I search for "myfirstserver.ipa.test" in the data table
205 Then I should not see "myfirstserver.ipa.test" entry in the data table