From 2a2a46e4410fcaeba40c3c91a0f3e19d2a1d23df Mon Sep 17 00:00:00 2001 From: Pablo Machado Date: Tue, 16 Jan 2024 14:35:30 +0100 Subject: [PATCH] [Security Solutions] Fix flaky entity analytics dashboard risk filter cypress tests (#174838) Implement the same solution proposal by Jared here https://github.com/elastic/kibana/pull/173970 ## Summary flaky tests: https://github.com/elastic/kibana/issues/174260 https://github.com/elastic/kibana/issues/174102 flaky test runner (300 runs) https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4864 ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../e2e/entity_analytics/dashboards/entity_analytics.cy.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts index 332da13af4359..56c0264d00ee8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts @@ -370,7 +370,10 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); it('filters by risk level', () => { + cy.get(HOSTS_TABLE).should('be.visible'); + cy.get(HOSTS_TABLE_ROWS).should('have.length', 5); cy.get(HOSTS_DONUT_CHART).should('include.text', '6Total'); + openRiskTableFilterAndSelectTheCriticalOption(); cy.get(HOSTS_DONUT_CHART).should('include.text', '1Total'); @@ -461,6 +464,8 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => it('filters by risk level', () => { cy.get(USERS_DONUT_CHART).should('include.text', '7Total'); + cy.get(USERS_TABLE).should('be.visible'); + cy.get(USERS_TABLE_ROWS).should('have.length', 5); openUserRiskTableFilterAndSelectTheLowOption(1);