Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Unskips and fixes detection_response tests #170937

Merged
merged 5 commits into from
Nov 10, 2023
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
import { QUERY_TAB_BUTTON, TIMELINE_DATA_PROVIDERS_CONTAINER } from '../../../screens/timeline';
import { waitForAlerts } from '../../../tasks/alerts';
import { createRule } from '../../../tasks/api_calls/rules';
import { deleteAlertsAndRules } from '../../../tasks/common';
import { investigateDashboardItemInTimeline } from '../../../tasks/dashboards/common';
import { waitToNavigateAwayFrom } from '../../../tasks/kibana_navigation';
import { login } from '../../../tasks/login';
Expand All @@ -42,10 +43,10 @@ import { ALERTS_URL, DASHBOARDS_URL, DETECTION_AND_RESPONSE_URL } from '../../..
const TEST_USER_NAME = 'test';
const SIEM_KIBANA_HOST_NAME = 'siem-kibana';

// FLAKY: https://github.com/elastic/kibana/issues/168772
// FLAKY: https://github.com/elastic/kibana/issues/168771
describe.skip('Detection response view', { tags: ['@ess', '@serverless'] }, () => {
describe('Detection response view', { tags: ['@ess', '@serverless'] }, () => {
before(() => {
deleteAlertsAndRules();
cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' });
createRule(getNewRule());
});

Expand All @@ -67,8 +68,8 @@ describe.skip('Detection response view', { tags: ['@ess', '@serverless'] }, () =
kqlSearch(`host.name : ${SIEM_KIBANA_HOST_NAME}{enter}`);

cy.get(HOST_TABLE_ROW_TOTAL_ALERTS).should('have.length', 1);
cy.get(RULE_TABLE_ROW_TOTAL_ALERTS).should('have.text', 2);
cy.get(ALERTS_DONUT_CHART).first().should('include.text', '2Open');
cy.get(RULE_TABLE_ROW_TOTAL_ALERTS).should('have.text', 1);
cy.get(ALERTS_DONUT_CHART).first().should('include.text', '1Open');
});

it(`filters out the users with KQL search bar query`, () => {
Expand All @@ -83,8 +84,8 @@ describe.skip('Detection response view', { tags: ['@ess', '@serverless'] }, () =
kqlSearch(`user.name : ${TEST_USER_NAME}{enter}`);

cy.get(USER_TABLE_ROW_TOTAL_ALERTS).should('have.length', 1);
cy.get(RULE_TABLE_ROW_TOTAL_ALERTS).should('have.text', 2);
cy.get(ALERTS_DONUT_CHART).first().should('include.text', '2Open');
cy.get(RULE_TABLE_ROW_TOTAL_ALERTS).should('have.text', 1);
cy.get(ALERTS_DONUT_CHART).first().should('include.text', '1Open');
});
});

Expand Down Expand Up @@ -229,7 +230,7 @@ describe.skip('Detection response view', { tags: ['@ess', '@serverless'] }, () =
expect(url.pathname.endsWith(ALERTS_URL)).eq(true);
});
waitForAlerts();
cy.get(ALERTS_COUNT).should('be.visible').should('have.text', `${alertCount} alerts`);
cy.get(ALERTS_COUNT).should('be.visible').should('have.text', `${alertCount} alert`);
cy.get(CONTROL_FRAMES).should('have.length', 2);
cy.get(OPTION_LIST_LABELS).eq(0).should('have.text', `Status`);
cy.get(OPTION_LIST_VALUES(0)).should('have.text', 'open1');
Expand All @@ -254,7 +255,7 @@ describe.skip('Detection response view', { tags: ['@ess', '@serverless'] }, () =
cy.get(USER_TABLE_ROW_SEV(severityVal)).click();
waitToNavigateAwayFrom(DASHBOARDS_URL);
waitForAlerts();
cy.get(ALERTS_COUNT).should('be.visible').should('have.text', `${alertCount} alerts`);
cy.get(ALERTS_COUNT).should('be.visible').should('have.text', `${alertCount} alert`);
cy.get(CONTROL_FRAMES).should('have.length', 3);
cy.get(OPTION_LIST_LABELS).eq(0).should('have.text', `Status`);
cy.get(OPTION_LIST_VALUES(0)).should('have.text', 'open1');
Expand Down
Loading