Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions web/cypress/e2e/incidents/00.coo_incidents_e2e.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ describe('BVT: Incidents - e2e', { tags: ['@smoke', '@slow', '@incidents', '@e2e
incidentsPage.clearAllFilters();

const intervalMs = 60_000;
const maxMinutes = 30;

cy.log('1.2 Wait for incident with custom alert to appear');
// Poll via UI traversal with OOM-safe findIncidentWithAlert.
// The search loop has three layers of OOM protection:
// 1. cy.reload() — releases browser DOM each iteration
// 2. _quietSearch — suppresses Cypress DOM snapshots
// 3. Hard timeout (35 min) — kills infinite loops
// This makes it safe to poll for the full 30-minute window.
cy.waitUntil(() => incidentsPage.findIncidentWithAlert(currentAlertName), {
interval: intervalMs,
timeout: maxMinutes * intervalMs,
interval: 2 * intervalMs,
timeout: 30 * intervalMs,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
});

cy.log('1.3 Verify custom alert appears in alerts table');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const MP = {
describe('Regression: Charts UI - Comprehensive', { tags: ['@incidents'] }, () => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
incidentsPage.warmUpForPlugin();
});

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ describe(
incidentsPage.setDays('1 day');
incidentsPage.elements.incidentsChartContainer().should('be.visible');
incidentsPage.elements.incidentsChartBarsGroups().should('have.length', 1);
cy.pause();

cy.log(
'2.2 Consecutive interval boundaries: End of segment 1 should equal Start of segment 2',
Expand Down Expand Up @@ -141,7 +140,6 @@ describe(
).to.equal(firstEnd);
});
});
cy.pause();

cy.log('2.3 Incident tooltip Start vs alert tooltip Start vs alerts table Start');
incidentsPage.hoverOverIncidentBarSegment(0, 0);
Expand Down Expand Up @@ -188,7 +186,6 @@ describe(
});
});
});
cy.pause();

cy.log('Expected failure: Incident tooltip Start times are 5 minutes off (OU-1221)');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ describe(
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });

// Reset the search timeout so this spec gets a fresh 35-minute window
incidentsPage.resetSearchTimeout();
Comment thread
coderabbitai[bot] marked this conversation as resolved.

cy.log('Create firing alert for testing');
cy.cleanupIncidentPrometheusRules();
cy.createKubePodCrashLoopingAlert().then((alertName) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const MP = {
describe('Regression: Silences Not Applied Correctly', { tags: ['@incidents'] }, () => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
incidentsPage.warmUpForPlugin();
});

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const MP = {
describe('Regression: Redux State Management', { tags: ['@incidents', '@incidents-redux'] }, () => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
incidentsPage.warmUpForPlugin();
});

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const MAX_GAP_RELAXED = 500;
describe('Regression: Stress Testing UI', { tags: ['@incidents'] }, () => {
before(() => {
cy.beforeBlockCOO(MCP, MP, { dashboards: false, troubleshootingPanel: false });
incidentsPage.warmUpForPlugin();
});

it('5.1 No excessive padding between chart top and alert bars for 100, 200, and 500 alerts', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Silenced and Firing Mixed Severity"
description: "One silenced critical incident (resolved) and one firing warning incident."
incidents:
- id: "silenced-critical-resolved-001"
component: "monitoring"
layer: "core"
timeline:
start: "4h"
end: "1h"
alerts:
- name: "SilencedCriticalAlert001"
namespace: "openshift-monitoring"
severity: "critical"
firing: false
silenced: true
timeline:
start: "3h"
end: "2h"

- id: "firing-warning-unsilenced-001"
component: "network"
layer: "core"
timeline:
start: "2h"
alerts:
- name: "FiringWarningAlert001"
namespace: "openshift-network"
severity: "warning"
firing: true
silenced: false
timeline:
start: "1h"
Loading