diff --git a/x-pack/plugins/security_solution/cypress/e2e/explore/dashboards/entity_analytics.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/explore/dashboards/entity_analytics.cy.ts index c1688b53797e3a..b261ad0ed58283 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/explore/dashboards/entity_analytics.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/explore/dashboards/entity_analytics.cy.ts @@ -33,7 +33,7 @@ import { } from '../../../screens/entity_analytics'; import { openRiskTableFilterAndSelectTheLowOption, - removeLowFilter, + removeLowFilterAndCloseRiskTableFilter, } from '../../../tasks/host_risk'; import { createRule } from '../../../tasks/api_calls/rules'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; @@ -152,14 +152,13 @@ describe('Entity Analytics Dashboard', () => { cy.get(HOSTS_TABLE_ALERT_CELL).should('have.length', 5); }); - // tracked by https://github.com/elastic/kibana/issues/161874 - it.skip('filters by risk classification', () => { + it('filters by risk classification', () => { openRiskTableFilterAndSelectTheLowOption(); cy.get(HOSTS_DONUT_CHART).should('include.text', '1Total'); cy.get(HOSTS_TABLE_ROWS).should('have.length', 1); - removeLowFilter(); + removeLowFilterAndCloseRiskTableFilter(); }); it('filters the host risk table with KQL search bar query', () => { @@ -247,7 +246,7 @@ describe('Entity Analytics Dashboard', () => { cy.get(USERS_DONUT_CHART).should('include.text', '2Total'); cy.get(USERS_TABLE_ROWS).should('have.length', 2); - removeLowFilter(); + removeLowFilterAndCloseRiskTableFilter(); }); it('filters the host risk table with KQL search bar query', () => { diff --git a/x-pack/plugins/security_solution/cypress/e2e/explore/hosts/host_risk_tab.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/explore/hosts/host_risk_tab.cy.ts index 55ce83a4a4a0cd..a6d1ab1ebdb50a 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/explore/hosts/host_risk_tab.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/explore/hosts/host_risk_tab.cy.ts @@ -9,7 +9,7 @@ import { cleanKibana } from '../../../tasks/common'; import { navigateToHostRiskDetailTab, openRiskTableFilterAndSelectTheCriticalOption, - removeCriticalFilter, + removeCriticalFilterAndCloseRiskTableFilter, selectFiveItemsPerPageOption, } from '../../../tasks/host_risk'; import { @@ -50,7 +50,7 @@ describe('risk tab', () => { cy.get(HOST_BY_RISK_TABLE_CELL).eq(3).should('not.have.text', 'siem-kibana'); - removeCriticalFilter(); + removeCriticalFilterAndCloseRiskTableFilter(); }); it('should be able to change items count per page', () => { diff --git a/x-pack/plugins/security_solution/cypress/tasks/host_risk.ts b/x-pack/plugins/security_solution/cypress/tasks/host_risk.ts index 32689f9ad4c8e4..2bb3c97db95bcb 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/host_risk.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/host_risk.ts @@ -30,12 +30,14 @@ export const openRiskTableFilterAndSelectTheLowOption = () => { cy.get(HOST_BY_RISK_TABLE_FILTER_LOW).click(); }; -export const removeLowFilter = () => { +export const removeLowFilterAndCloseRiskTableFilter = () => { cy.get(HOST_BY_RISK_TABLE_FILTER_LOW).click(); + cy.get(HOST_BY_RISK_TABLE_FILTER).first().click(); }; -export const removeCriticalFilter = () => { +export const removeCriticalFilterAndCloseRiskTableFilter = () => { cy.get(HOST_BY_RISK_TABLE_FILTER_CRITICAL).click(); + cy.get(HOST_BY_RISK_TABLE_FILTER).first().click(); }; export const selectFiveItemsPerPageOption = () => {