Skip to content

Commit 9119fc8

Browse files
committed
fix: COO install bugs in Incident tests
The current implementation was using the COO namespace there. Additionally adds wait after the initial welcome pop-up removal to target a race condition when cypress navigated to a new page before pop closing finished, leading to it rerendering again. .
1 parent 2373894 commit 9119fc8

9 files changed

Lines changed: 11 additions & 9 deletions

web/cypress/e2e/incidents/00.coo_incidents_e2e.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const MCP = {
1717
};
1818

1919
const MP = {
20-
namespace: Cypress.env('COO_NAMESPACE'),
20+
namespace: 'openshift-monitoring',
2121
operatorName: 'Cluster Monitoring Operator',
2222
};
2323

web/cypress/e2e/incidents/01.incidents.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const MCP = {
2222
};
2323

2424
const MP = {
25-
namespace: Cypress.env('COO_NAMESPACE'),
25+
namespace: 'openshift-monitoring',
2626
operatorName: 'Cluster Monitoring Operator',
2727
};
2828

web/cypress/e2e/incidents/02.incidents-mocking-example.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const MCP = {
2222
};
2323

2424
const MP = {
25-
namespace: Cypress.env('COO_NAMESPACE'),
25+
namespace: 'openshift-monitoring',
2626
operatorName: 'Cluster Monitoring Operator',
2727
};
2828

web/cypress/e2e/incidents/regression/01.reg_filtering.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const MCP = {
2121
};
2222

2323
const MP = {
24-
namespace: Cypress.env('COO_NAMESPACE'),
24+
namespace: 'openshift-monitoring',
2525
operatorName: 'Cluster Monitoring Operator',
2626
};
2727

web/cypress/e2e/incidents/regression/02.reg_ui_charts_comprehensive.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const MCP = {
8080
};
8181

8282
const MP = {
83-
namespace: Cypress.env('COO_NAMESPACE'),
83+
namespace: 'openshift-monitoring',
8484
operatorName: 'Cluster Monitoring Operator',
8585
};
8686

web/cypress/e2e/incidents/regression/03.reg_api_calls.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const MCP = {
2222
};
2323

2424
const MP = {
25-
namespace: Cypress.env('COO_NAMESPACE'),
25+
namespace: 'openshift-monitoring',
2626
operatorName: 'Cluster Monitoring Operator',
2727
};
2828

web/cypress/e2e/incidents/regression/04.reg_redux_effects.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const MCP = {
2626
};
2727

2828
const MP = {
29-
namespace: Cypress.env('COO_NAMESPACE'),
29+
namespace: 'openshift-monitoring',
3030
operatorName: 'Cluster Monitoring Operator',
3131
};
3232

web/cypress/support/commands/operator-commands.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ const operatorUtils = {
206206
cy.log(`Monitoring plugin pod is now running in namespace: ${MP.namespace}`);
207207
cy.reload(true);
208208
});
209-
// });
210209

211210
} else {
212211
cy.log('MP_IMAGE is NOT set. Skipping patching the image in CMO operator CSV.');

web/cypress/views/tour.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export const guidedTour = {
2525
.should('not.exist')
2626
.then(() => cy.log('Modal successfully closed'));
2727
}
28-
28+
// Prevents navigating away from the page before the tour is closed
29+
cy.wait(2000);
2930
});
3031
},
3132

@@ -35,6 +36,8 @@ export const guidedTour = {
3536
if ($body.find(`[aria-label="Welcome modal"]`).length > 0) {
3637
cy.get('[aria-label="Close"]').should('be.visible').click();
3738
}
39+
// Prevents navigating away from the page before the tour is closed
40+
cy.wait(2000);
3841
});
3942
},
4043
};

0 commit comments

Comments
 (0)