Skip to content

Commit

Permalink
fixes CI issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema committed Nov 27, 2020
1 parent 2ef6b65 commit ee2a570
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ describe('Exceptions', () => {
waitForAlertsToPopulate();
refreshPage();

cy.scrollTo('bottom');
cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.then((numberOfInitialAlertsText) => {
Expand All @@ -78,7 +77,6 @@ describe('Exceptions', () => {
goToAlertsTab();
refreshPage();

cy.scrollTo('bottom');
cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.then((numberOfAlertsAfterCreatingExceptionText) => {
Expand All @@ -88,7 +86,6 @@ describe('Exceptions', () => {
goToClosedAlerts();
refreshPage();

cy.scrollTo('bottom');
cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.then((numberOfClosedAlertsAfterCreatingExceptionText) => {
Expand All @@ -102,7 +99,6 @@ describe('Exceptions', () => {
waitForTheRuleToBeExecuted();
refreshPage();

cy.scrollTo('bottom');
cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.then((numberOfOpenedAlertsAfterCreatingExceptionText) => {
Expand All @@ -117,7 +113,6 @@ describe('Exceptions', () => {
waitForAlertsToPopulate();
refreshPage();

cy.scrollTo('bottom');
cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.then((numberOfAlertsAfterRemovingExceptionsText) => {
Expand All @@ -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) => {
Expand All @@ -145,7 +139,6 @@ describe('Exceptions', () => {
goToClosedAlerts();
refreshPage();

cy.scrollTo('bottom');
cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.then((numberOfClosedAlertsAfterCreatingExceptionText) => {
Expand All @@ -159,7 +152,6 @@ describe('Exceptions', () => {
waitForTheRuleToBeExecuted();
refreshPage();

cy.scrollTo('bottom');
cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.then((numberOfOpenedAlertsAfterCreatingExceptionText) => {
Expand All @@ -173,7 +165,6 @@ describe('Exceptions', () => {
waitForAlertsToPopulate();
refreshPage();

cy.scrollTo('bottom');
cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.then((numberOfAlertsAfterRemovingExceptionsText) => {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/security_solution/cypress/objects/exception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -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"]';
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit ee2a570

Please sign in to comment.