Skip to content

Commit 8a6687c

Browse files
Merge pull request #1102 from kyoto/tests-remove-before-all-button-check
Tests: Simplify check for main button existence in "before all" hook
2 parents 975e3d8 + 4eeec7f commit 8a6687c

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

tests/tests/lightspeed-install.cy.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,8 @@ spec:
185185
logLevel: INFO`;
186186
cy.exec(`echo '${config}' | oc create -f - --kubeconfig ${Cypress.env('KUBECONFIG_PATH')}`);
187187

188-
cy.get('body').then(($body) => {
189-
if ($body.find('.pf-v5-c-alert:contains("Web console update is available")').length > 0) {
190-
cy.get('.pf-v5-c-alert', { timeout: 2 * MINUTE })
191-
.contains('Web console update is available', { timeout: 2 * MINUTE })
192-
.should('exist');
193-
} else {
194-
cy.get(mainButton, { timeout: 5 * MINUTE }).should('exist');
195-
}
196-
});
188+
cy.visit('/');
189+
cy.get(mainButton, { timeout: 5 * MINUTE }).should('exist');
197190
});
198191

199192
after(() => {
@@ -214,9 +207,7 @@ spec:
214207
it('OpenShift Lightspeed popover UI is loaded and basic functionality is working', () => {
215208
cy.visit('/');
216209

217-
cy.get(mainButton, { timeout: 5 * MINUTE })
218-
.should('exist')
219-
.click();
210+
cy.get(mainButton).click();
220211

221212
// Test that popover UI was opened
222213
cy.get(popover)

0 commit comments

Comments
 (0)