@@ -8,7 +8,6 @@ Natural creation of the alert is done in the 00.coo_incidents_e2e.cy.ts test,
88but takes significant time.
99*/
1010
11- import { commonPages } from '../../views/common' ;
1211import { incidentsPage } from '../../views/incidents-page' ;
1312
1413const MCP = {
@@ -26,17 +25,11 @@ const MP = {
2625 operatorName : 'Cluster Monitoring Operator' ,
2726} ;
2827
29- const ALERTNAME = 'Watchdog' ;
30- const NAMESPACE = 'openshift-monitoring' ;
31- const SEVERITY = 'Critical' ;
32- const ALERT_DESC = 'This is an alert meant to ensure that the entire alerting pipeline is functional. This alert is always firing, therefore it should always be firing in Alertmanager and always fire against a receiver. There are integrations with various notification mechanisms that send a notification when this alert is not firing. For example the "DeadMansSnitch" integration in PagerDuty.'
33- const ALERT_SUMMARY = 'An alert that should always be firing to certify that Alertmanager is working properly.'
3428describe ( 'BVT: Incidents - UI' , { tags : [ '@smoke' , '@incidents' ] } , ( ) => {
3529 before ( ( ) => {
3630 cy . beforeBlockCOO ( MCP , MP , { dashboards : false , troubleshootingPanel : false } ) ;
3731 } ) ;
3832
39-
4033 beforeEach ( ( ) => {
4134 cy . log ( 'Navigate to Observe → Incidents' ) ;
4235 incidentsPage . goTo ( ) ;
@@ -49,7 +42,7 @@ describe('BVT: Incidents - UI', { tags: ['@smoke', '@incidents'] }, () => {
4942 incidentsPage . elements . toolbar ( ) . should ( 'be.visible' ) ;
5043 incidentsPage . elements . toggleChartsButton ( ) . should ( 'be.visible' ) ;
5144 incidentsPage . elements . toggleChartsButton ( ) . click ( ) ;
52-
45+
5346 cy . log ( '1.2 Verify charts are hidden after toggle' ) ;
5447 incidentsPage . elements . incidentsChartTitle ( ) . should ( 'not.exist' ) ;
5548 incidentsPage . elements . alertsChartTitle ( ) . should ( 'not.exist' ) ;
@@ -59,7 +52,7 @@ describe('BVT: Incidents - UI', { tags: ['@smoke', '@incidents'] }, () => {
5952 it ( '2. Admin perspective - Incidents page - Days filter functionality' , ( ) => {
6053 cy . log ( '2.1 Set days filter to 3 days' ) ;
6154 incidentsPage . setDays ( '3 days' ) ;
62-
55+
6356 cy . log ( '2.2 Verify filter selection is updated' ) ;
6457 incidentsPage . elements . daysSelectToggle ( ) . should ( 'contain.text' , '3 days' ) ;
6558 } ) ;
@@ -68,19 +61,19 @@ describe('BVT: Incidents - UI', { tags: ['@smoke', '@incidents'] }, () => {
6861 cy . log ( '3.1 Clear filters and toggle Critical filter' ) ;
6962 incidentsPage . clearAllFilters ( ) ;
7063 incidentsPage . toggleFilter ( 'Critical' ) ;
71- // Visibility verification of the filter chip is too complex. The functionality will be
64+ // Visibility verification of the filter chip is too complex. The functionality will be
7265 // better verified in the filtering specific test.
7366 cy . log ( '3.2 Verify filter can be removed' ) ;
7467 incidentsPage . removeFilter ( 'Severity' , 'Critical' ) ;
7568 } ) ;
7669
7770 it ( '4. Admin perspective - Incidents page - Charts and alerts empty state' , ( ) => {
7871 cy . mockIncidents ( [ ] ) ;
79-
72+
8073 cy . log ( '4.1 Verify chart titles are visible' ) ;
8174 incidentsPage . elements . incidentsChartTitle ( ) . should ( 'be.visible' ) ;
8275 incidentsPage . elements . alertsChartTitle ( ) . should ( 'be.visible' ) ;
83-
76+
8477 cy . log ( '4.2 Verify alerts chart shows empty state' ) ;
8578 incidentsPage . elements . alertsChartEmptyState ( ) . should ( 'exist' ) ;
8679 } ) ;
@@ -92,12 +85,14 @@ describe('BVT: Incidents - UI', { tags: ['@smoke', '@incidents'] }, () => {
9285 incidentsPage . findIncidentWithAlert ( 'TargetAlert' ) . should ( 'be.false' ) ;
9386
9487 cy . log ( '5.2 Verify traversing incident table works when the alert is not present' ) ;
95- cy . mockIncidentFixture ( 'incident-scenarios/1-single-incident-firing-critical-and-warning-alerts.yaml' ) ;
88+ cy . mockIncidentFixture (
89+ 'incident-scenarios/1-single-incident-firing-critical-and-warning-alerts.yaml' ,
90+ ) ;
9691 incidentsPage . findIncidentWithAlert ( 'TargetAlert' ) . should ( 'be.false' ) ;
9792
98- incidentsPage . clearAllFilters
93+ incidentsPage . clearAllFilters ( ) ;
9994 cy . log ( '5.3 Verify traversing incident table works when the alert is present' ) ;
10095 cy . mockIncidentFixture ( 'incident-scenarios/6-multi-incident-target-alert-scenario.yaml' ) ;
101- incidentsPage . findIncidentWithAlert ( 'TargetAlert' ) . should ( 'be.true' ) ;
96+ incidentsPage . findIncidentWithAlert ( 'TargetAlert' ) . should ( 'be.true' ) ;
10297 } ) ;
103- } ) ;
98+ } ) ;
0 commit comments