Debian Codegraph @

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

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