|
3 | 3 | describe('Automation > Embedded Automate > Customization', () => {
|
4 | 4 | beforeEach(() => {
|
5 | 5 | cy.login();
|
6 |
| - cy.intercept('POST', '/ops/accordion_select?id=rbac_accord').as('accordion'); |
7 | 6 | cy.menu('Automation', 'Embedded Automate', 'Customization');
|
8 | 7 | cy.get('#explorer_title_text');
|
9 | 8 | });
|
@@ -162,4 +161,82 @@ describe('Automation > Embedded Automate > Customization', () => {
|
162 | 161 | cy.get('[class="list-group"]').should('not.contain', 'Test Description');
|
163 | 162 | });
|
164 | 163 | });
|
| 164 | + |
| 165 | + describe('Button Form', () => { |
| 166 | + beforeEach(() => { |
| 167 | + cy.intercept('POST', '/miq_ae_customization/accordion_select?id=ab_accord').as('accordion'); |
| 168 | + cy.get('#control_ab_accord > .panel-title > .collapsed').click(); |
| 169 | + cy.wait('@accordion'); |
| 170 | + cy.wait(5000); |
| 171 | + }); |
| 172 | + |
| 173 | + it('Validates the save button correctly', () => { |
| 174 | + cy.get('.clickable-row').contains('Availability Zone').click({force: true}); |
| 175 | + cy.get('.clickable-row').contains('Unassigned Buttons').click({force: true}); |
| 176 | + cy.get('[title="Configuration"]').click({force: true}); |
| 177 | + cy.get('[title="Add a new Button"]').click({force: true}); |
| 178 | + cy.get('#explorer_title_text').contains('Adding a new Button'); |
| 179 | + |
| 180 | + cy.get('#name').type('Test Button'); |
| 181 | + cy.get('#description').type('Test Description'); |
| 182 | + cy.get('.icon-button').click(); |
| 183 | + cy.get(':nth-child(1) > span > .ff').click(); |
| 184 | + cy.get('.bx--modal-footer > .bx--btn--primary').click(); |
| 185 | + |
| 186 | + cy.get('#ab_advanced_tab_tab > a').click(); |
| 187 | + cy.get('#object_request').type('Test Request'); |
| 188 | + cy.get('#attribute_1').type('1-attribute'); |
| 189 | + cy.get('#value_1').type('1-value'); |
| 190 | + cy.get('#attribute_2').type('2-attribute'); |
| 191 | + cy.get('#value_2').type('2-value'); |
| 192 | + cy.get('.col-md-10 > .btn-group > .btn').click(); |
| 193 | + cy.get('.col-md-10 > .btn-group > .open > .dropdown-menu > [data-original-index="1"] > a').click(); |
| 194 | + |
| 195 | + cy.get('#roles_1').click(); |
| 196 | + cy.get('#roles_2').click(); |
| 197 | + cy.get('#roles_3').click(); |
| 198 | + cy.get('#roles_4').click(); |
| 199 | + |
| 200 | + cy.get('#buttons_on > .btn-primary').click(); |
| 201 | + cy.get('.clickable-row').contains('Test Button').click(); |
| 202 | + |
| 203 | + cy.get('.attribute_value_pair').contains('1-attribute, 1-value'); |
| 204 | + cy.get('.attribute_value_pair').contains('2-attribute, 2-value'); |
| 205 | + cy.get('.visibility').contains('EvmRole-administrator, EvmRole-approver, EvmRole-auditor, EvmRole-super_administrator'); |
| 206 | + |
| 207 | + cy.get('[title="Configuration"]').click(); |
| 208 | + cy.get('[title="Edit this Button"]').click(); |
| 209 | + |
| 210 | + cy.get('#buttons_off > .btn-primary'); |
| 211 | + cy.get('#ab_advanced_tab_tab > a').click(); |
| 212 | + cy.get('#attribute_2').clear(); |
| 213 | + cy.get('#value_2').clear(); |
| 214 | + |
| 215 | + cy.get('#buttons_on > .btn-primary').click(); |
| 216 | + |
| 217 | + cy.get('.attribute_value_pair').contains('1-attribute, 1-value'); |
| 218 | + cy.get('.attribute_value_pair').should('not.contain', '2-attribute, 2-value'); |
| 219 | + |
| 220 | + cy.get('[title="Configuration"]').click(); |
| 221 | + cy.get('[title="Edit this Button"]').click(); |
| 222 | + |
| 223 | + cy.get('#buttons_off > .btn-primary'); |
| 224 | + cy.get('#ab_advanced_tab_tab > a').click(); |
| 225 | + |
| 226 | + cy.get('#roles_2').click(); |
| 227 | + cy.get('#roles_3').click(); |
| 228 | + |
| 229 | + cy.get('#buttons_on > .btn-primary').click(); |
| 230 | + |
| 231 | + cy.get('.visibility').contains('EvmRole-auditor, EvmRole-super_administrator'); |
| 232 | + cy.get('.visibility').should('not.contain', 'EvmRole-administrator, EvmRole-approver'); |
| 233 | + |
| 234 | + cy.get('[title="Configuration"]').click(); |
| 235 | + cy.get('[title="Remove this Button"]').click(); |
| 236 | + cy.get('h4 > strong').contains('Test Button'); |
| 237 | + cy.get('.Delete').click({ force: true }); |
| 238 | + |
| 239 | + cy.get('.alert').contains('The item "Test Button" has been successfully deleted'); |
| 240 | + }); |
| 241 | + }); |
165 | 242 | });
|
0 commit comments