Skip to content

Commit

Permalink
fixes merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema committed Nov 30, 2020
1 parent 4040d4e commit 19a210d
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import { SERVER_SIDE_EVENT_COUNT } from '../screens/timeline';
import { NOTIFICATION_TOASTS, TOAST_ERROR_CLASS } from '../screens/shared';
import { TIMELINE } from '../screens/timelines';
import { refreshPage } from './security_header';
import { NUMBER_OF_ALERTS } from '../screens/alerts';

export const createAndActivateRule = () => {
cy.get(SCHEDULE_CONTINUE_BUTTON).click({ force: true });
Expand Down Expand Up @@ -303,22 +304,6 @@ export const selectThresholdRuleType = () => {
cy.get(THRESHOLD_TYPE).click({ force: true });
};

export const waitForAlertsToPopulate = async () => {
cy.waitUntil(
() => {
refreshPage();
return cy
.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.then((countText) => {
const alertCount = parseInt(countText, 10) || 0;
return alertCount > 0;
});
},
{ interval: 500, timeout: 12000 }
);
};

export const waitForTheRuleToBeExecuted = () => {
cy.waitUntil(() => {
cy.get(REFRESH_BUTTON).click();
Expand Down

0 comments on commit 19a210d

Please sign in to comment.