Skip to content

Commit 58c781f

Browse files
committed
Consolidate tests that click rows in the settings details table
These tests are basically the same thing. If this form were to break, all these tests would likely fail. It's probably better to avoid the extra setup/teardown for each test by consolidating into a single test. See also: https://docs.cypress.io/app/core-concepts/best-practices#Creating-Tiny-Tests-With-A-Single-Assertion
1 parent 454d6bb commit 58c781f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

cypress/e2e/ui/Settings/Application-Settings/settings_details_tab.cy.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@ describe('Settings > Application Settings > Details', () => {
1010
});
1111

1212
describe('Settings Details Tab', () => {
13-
it('Region row is replaced by region form when clicked', () => {
13+
it('Click row and reroute', () => {
1414
cy.get('.bx--front-line').contains('Region 0').click({force: true});
1515
cy.get('.bx--label').contains('Description').should('exist');
16-
});
17-
it('Clicks on analysis profiles row and reroutes', () => {
16+
cy.get('[data-nodeid="0.0"].node-treeview-settings_tree').contains('ManageIQ Region').click();
17+
1818
cy.get('.bx--front-line').contains('Analysis Profiles').click({force: true});
1919
cy.get('#explorer_title_text').contains('Settings Analysis Profiles').should('exist');
20-
});
21-
it('Clicks on zones row and reroutes', () => {
20+
cy.get('[data-nodeid="0.0"].node-treeview-settings_tree').contains('ManageIQ Region').click();
21+
2222
cy.get('.bx--front-line').contains('Zones').click({force: true});
2323
cy.get('#explorer_title_text').contains('Settings Zones').should('exist');
24-
});
25-
it('Clicks on schedules row and reroutes', () => {
24+
cy.get('[data-nodeid="0.0"].node-treeview-settings_tree').contains('ManageIQ Region').click();
25+
2626
cy.get('.bx--front-line').contains('Schedules').click({force: true});
2727
cy.get('#explorer_title_text').contains('Settings Schedules').should('exist');
2828
});
29+
2930
it('Updates region name when changed', () => {
3031
cy.get('.bx--front-line').contains('Region 0').click({force: true});
3132
cy.get('#description').clear().type('Region 1');

0 commit comments

Comments
 (0)