Skip to content

Commit ee2a570

Browse files
committed
fixes CI issue
1 parent 2ef6b65 commit ee2a570

6 files changed

Lines changed: 8 additions & 12 deletions

File tree

x-pack/plugins/security_solution/cypress/integration/alerts_detection_exceptions.spec.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ describe('Exceptions', () => {
5252
waitForAlertsToPopulate();
5353
refreshPage();
5454

55-
cy.scrollTo('bottom');
5655
cy.get(SERVER_SIDE_EVENT_COUNT)
5756
.invoke('text')
5857
.then((numberOfInitialAlertsText) => {
@@ -78,7 +77,6 @@ describe('Exceptions', () => {
7877
goToAlertsTab();
7978
refreshPage();
8079

81-
cy.scrollTo('bottom');
8280
cy.get(SERVER_SIDE_EVENT_COUNT)
8381
.invoke('text')
8482
.then((numberOfAlertsAfterCreatingExceptionText) => {
@@ -88,7 +86,6 @@ describe('Exceptions', () => {
8886
goToClosedAlerts();
8987
refreshPage();
9088

91-
cy.scrollTo('bottom');
9289
cy.get(SERVER_SIDE_EVENT_COUNT)
9390
.invoke('text')
9491
.then((numberOfClosedAlertsAfterCreatingExceptionText) => {
@@ -102,7 +99,6 @@ describe('Exceptions', () => {
10299
waitForTheRuleToBeExecuted();
103100
refreshPage();
104101

105-
cy.scrollTo('bottom');
106102
cy.get(SERVER_SIDE_EVENT_COUNT)
107103
.invoke('text')
108104
.then((numberOfOpenedAlertsAfterCreatingExceptionText) => {
@@ -117,7 +113,6 @@ describe('Exceptions', () => {
117113
waitForAlertsToPopulate();
118114
refreshPage();
119115

120-
cy.scrollTo('bottom');
121116
cy.get(SERVER_SIDE_EVENT_COUNT)
122117
.invoke('text')
123118
.then((numberOfAlertsAfterRemovingExceptionsText) => {
@@ -135,7 +130,6 @@ describe('Exceptions', () => {
135130
addsException(exception);
136131
esArchiverLoad('auditbeat_for_exceptions2');
137132

138-
cy.scrollTo('bottom');
139133
cy.get(SERVER_SIDE_EVENT_COUNT)
140134
.invoke('text')
141135
.then((numberOfAlertsAfterCreatingExceptionText) => {
@@ -145,7 +139,6 @@ describe('Exceptions', () => {
145139
goToClosedAlerts();
146140
refreshPage();
147141

148-
cy.scrollTo('bottom');
149142
cy.get(SERVER_SIDE_EVENT_COUNT)
150143
.invoke('text')
151144
.then((numberOfClosedAlertsAfterCreatingExceptionText) => {
@@ -159,7 +152,6 @@ describe('Exceptions', () => {
159152
waitForTheRuleToBeExecuted();
160153
refreshPage();
161154

162-
cy.scrollTo('bottom');
163155
cy.get(SERVER_SIDE_EVENT_COUNT)
164156
.invoke('text')
165157
.then((numberOfOpenedAlertsAfterCreatingExceptionText) => {
@@ -173,7 +165,6 @@ describe('Exceptions', () => {
173165
waitForAlertsToPopulate();
174166
refreshPage();
175167

176-
cy.scrollTo('bottom');
177168
cy.get(SERVER_SIDE_EVENT_COUNT)
178169
.invoke('text')
179170
.then((numberOfAlertsAfterRemovingExceptionsText) => {

x-pack/plugins/security_solution/cypress/objects/exception.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ export interface Exception {
1212

1313
export const exception: Exception = {
1414
field: 'host.name',
15-
operator: 'is one of',
16-
values: ['siem-kibana', 'suricata-iowa', 'siem-es', 'jessie', 'siem'],
15+
operator: 'is',
16+
values: ['suricata-iowa'],
1717
};

x-pack/plugins/security_solution/cypress/screens/exceptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ export const LOADING_SPINNER = '[data-test-subj="loading-spinner"]';
2121
export const OPERATOR_INPUT = '[data-test-subj="operatorAutocompleteComboBox"]';
2222

2323
export const VALUES_INPUT =
24-
'[data-test-subj="valuesAutocompleteMatchAny"] [data-test-subj="comboBoxInput"]';
24+
'[data-test-subj="valuesAutocompleteMatch"] [data-test-subj="comboBoxInput"]';

x-pack/plugins/security_solution/cypress/tasks/rule_details.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@ import {
2424
} from '../screens/rule_details';
2525

2626
export const activatesRule = () => {
27+
cy.server();
28+
cy.route('PATCH', '**/api/detection_engine/rules/_bulk_update').as('bulk_update');
2729
cy.get(RULE_SWITCH).should('be.visible');
2830
cy.get(RULE_SWITCH).click();
31+
cy.wait('@bulk_update').then((response) => {
32+
cy.wrap(response.status).should('eql', 200);
33+
});
2934
};
3035

3136
export const deactivatesRule = () => {
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)