From ee2a5704ca37007b626b43b2e9a4d63b6b52e2ac Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Wed, 25 Nov 2020 22:43:19 +0100 Subject: [PATCH] fixes CI issue --- .../alerts_detection_exceptions.spec.ts | 9 --------- .../cypress/objects/exception.ts | 4 ++-- .../cypress/screens/exceptions.ts | 2 +- .../cypress/tasks/rule_details.ts | 5 +++++ .../auditbeat_for_exceptions/data.json.gz | Bin 1105 -> 1112 bytes .../auditbeat_for_exceptions2/data.json.gz | Bin 1107 -> 1113 bytes 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_exceptions.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_exceptions.spec.ts index a43ba1581773d..b1d7163ac70e0 100644 --- a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_exceptions.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_exceptions.spec.ts @@ -52,7 +52,6 @@ describe('Exceptions', () => { waitForAlertsToPopulate(); refreshPage(); - cy.scrollTo('bottom'); cy.get(SERVER_SIDE_EVENT_COUNT) .invoke('text') .then((numberOfInitialAlertsText) => { @@ -78,7 +77,6 @@ describe('Exceptions', () => { goToAlertsTab(); refreshPage(); - cy.scrollTo('bottom'); cy.get(SERVER_SIDE_EVENT_COUNT) .invoke('text') .then((numberOfAlertsAfterCreatingExceptionText) => { @@ -88,7 +86,6 @@ describe('Exceptions', () => { goToClosedAlerts(); refreshPage(); - cy.scrollTo('bottom'); cy.get(SERVER_SIDE_EVENT_COUNT) .invoke('text') .then((numberOfClosedAlertsAfterCreatingExceptionText) => { @@ -102,7 +99,6 @@ describe('Exceptions', () => { waitForTheRuleToBeExecuted(); refreshPage(); - cy.scrollTo('bottom'); cy.get(SERVER_SIDE_EVENT_COUNT) .invoke('text') .then((numberOfOpenedAlertsAfterCreatingExceptionText) => { @@ -117,7 +113,6 @@ describe('Exceptions', () => { waitForAlertsToPopulate(); refreshPage(); - cy.scrollTo('bottom'); cy.get(SERVER_SIDE_EVENT_COUNT) .invoke('text') .then((numberOfAlertsAfterRemovingExceptionsText) => { @@ -135,7 +130,6 @@ describe('Exceptions', () => { addsException(exception); esArchiverLoad('auditbeat_for_exceptions2'); - cy.scrollTo('bottom'); cy.get(SERVER_SIDE_EVENT_COUNT) .invoke('text') .then((numberOfAlertsAfterCreatingExceptionText) => { @@ -145,7 +139,6 @@ describe('Exceptions', () => { goToClosedAlerts(); refreshPage(); - cy.scrollTo('bottom'); cy.get(SERVER_SIDE_EVENT_COUNT) .invoke('text') .then((numberOfClosedAlertsAfterCreatingExceptionText) => { @@ -159,7 +152,6 @@ describe('Exceptions', () => { waitForTheRuleToBeExecuted(); refreshPage(); - cy.scrollTo('bottom'); cy.get(SERVER_SIDE_EVENT_COUNT) .invoke('text') .then((numberOfOpenedAlertsAfterCreatingExceptionText) => { @@ -173,7 +165,6 @@ describe('Exceptions', () => { waitForAlertsToPopulate(); refreshPage(); - cy.scrollTo('bottom'); cy.get(SERVER_SIDE_EVENT_COUNT) .invoke('text') .then((numberOfAlertsAfterRemovingExceptionsText) => { diff --git a/x-pack/plugins/security_solution/cypress/objects/exception.ts b/x-pack/plugins/security_solution/cypress/objects/exception.ts index 2182a5b6fa6d2..775a83dee2543 100644 --- a/x-pack/plugins/security_solution/cypress/objects/exception.ts +++ b/x-pack/plugins/security_solution/cypress/objects/exception.ts @@ -12,6 +12,6 @@ export interface Exception { export const exception: Exception = { field: 'host.name', - operator: 'is one of', - values: ['siem-kibana', 'suricata-iowa', 'siem-es', 'jessie', 'siem'], + operator: 'is', + values: ['suricata-iowa'], }; diff --git a/x-pack/plugins/security_solution/cypress/screens/exceptions.ts b/x-pack/plugins/security_solution/cypress/screens/exceptions.ts index fc871237c3f4f..4e263903a34a6 100644 --- a/x-pack/plugins/security_solution/cypress/screens/exceptions.ts +++ b/x-pack/plugins/security_solution/cypress/screens/exceptions.ts @@ -21,4 +21,4 @@ export const LOADING_SPINNER = '[data-test-subj="loading-spinner"]'; export const OPERATOR_INPUT = '[data-test-subj="operatorAutocompleteComboBox"]'; export const VALUES_INPUT = - '[data-test-subj="valuesAutocompleteMatchAny"] [data-test-subj="comboBoxInput"]'; + '[data-test-subj="valuesAutocompleteMatch"] [data-test-subj="comboBoxInput"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts b/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts index 0b418af541dea..9dd23a1dfa71f 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts @@ -24,8 +24,13 @@ import { } from '../screens/rule_details'; export const activatesRule = () => { + cy.server(); + cy.route('PATCH', '**/api/detection_engine/rules/_bulk_update').as('bulk_update'); cy.get(RULE_SWITCH).should('be.visible'); cy.get(RULE_SWITCH).click(); + cy.wait('@bulk_update').then((response) => { + cy.wrap(response.status).should('eql', 200); + }); }; export const deactivatesRule = () => { diff --git a/x-pack/test/security_solution_cypress/es_archives/auditbeat_for_exceptions/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/auditbeat_for_exceptions/data.json.gz index 6c0d4b234fe4b54652206010741d5ac63cc8a7d3..4139fd9d28f46afe02883236ac50d20fdd697ce5 100644 GIT binary patch literal 1112 zcmV-e1gHBSiwFqq?!aFF17u-zVJ>QOZ*Bm+R!wi)I1s((R|G!o0+m9_`ZTb>B1jL# zqUfPr6v$#B(B#PBS|SCCvf~!{?4&IgBY-aP92&F$?z-{M7zcVsLnuU?E`45 zv+3n}R9f@dS+^$*omq;JTit*iMj?)Dsw>=su_bg5+QwjaRVtf#oyT#$u(9l!zb`ou zUXv}axjvQOq!`ZCcL6mO8su@{!zD~dh1X~Y#ym5d;uPT|PNM{;MVvUn#%-w?SNn^z zPebSv7qe|HxCew`181PD_l~yn9x}siE{GmG zz0k;Lp^<43MoAo=e}B4}Iht(`wDY%hScgNr#5y?4NJr?o{*?fIlxkmAwLH3YQKDfd z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