Skip to content

Commit

Permalink
removing flakey test
Browse files Browse the repository at this point in the history
  • Loading branch information
yctercero committed Feb 13, 2021
1 parent 04fda55 commit 4a33720
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const NO_ALERT_INDEX = 'no-alert-index-049FC71A-4C2C-446F-9901-37XMC5024C
export const ENDPOINT_METADATA_INDEX = 'metrics-endpoint.metadata-*';
export const DEFAULT_RULE_REFRESH_INTERVAL_ON = true;
export const DEFAULT_RULE_REFRESH_INTERVAL_VALUE = 60000; // ms
export const DEFAULT_RULE_REFRESH_IDLE_VALUE = 300000; // ms
export const DEFAULT_RULE_REFRESH_IDLE_VALUE = 2700000; // ms
export const DEFAULT_RULE_NOTIFICATION_QUERY_SIZE = 100;

export enum SecurityPageName {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ export const LOAD_PREBUILT_RULES_BTN = '[data-test-subj="load-prebuilt-rules"]';
export const LOADING_INITIAL_PREBUILT_RULES_TABLE =
'[data-test-subj="initialLoadingPanelAllRulesTable"]';

export const FROSTED_LOADING_RULES_TABLE = '[data-test-subj="loadingPanelAllRulesTable"]';

export const ASYNC_LOADING_PROGRESS = '[data-test-subj="loadingRulesInfoProgress"]';

export const NEXT_BTN = '[data-test-subj="pagination-button-next"]';
Expand Down Expand Up @@ -70,12 +68,6 @@ export const SORT_RULES_BTN = '[data-test-subj="tableHeaderSortButton"]';

export const THREE_HUNDRED_ROWS = '[data-test-subj="tablePagination-300-rows"]';

export const FIVE_ROWS = '[data-test-subj="tablePagination-5-rows"]';

export const RULE_AUTO_REFRESH_IDLE_MODAL = '[data-test-subj="allRulesIdleModal"]';

export const RULE_AUTO_REFRESH_IDLE_MODAL_CONTINUE = '[data-test-subj="allRulesIdleModal"] button';

export const FIRST_PAGE_SELECTOR = '[data-test-subj="pagination-button-0"]';

export const SECOND_PAGE_SELECTOR = '[data-test-subj="pagination-button-1"]';
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,13 @@ import {
ASYNC_LOADING_PROGRESS,
RULE_AUTO_REFRESH_IDLE_MODAL,
RULE_AUTO_REFRESH_IDLE_MODAL_CONTINUE,
FIVE_ROWS,
SECOND_PAGE_SELECTOR,
FROSTED_LOADING_RULES_TABLE,
} from '../screens/alerts_detection_rules';
import { ALL_ACTIONS, DELETE_RULE } from '../screens/rule_details';

export const activateRule = (rulePosition: number) => {
cy.get(RULE_SWITCH).eq(rulePosition).click({ force: true });
};

export const changeToFiveRowsPerPage = () => {
cy.get(PAGINATION_POPOVER_BTN).click({ force: true });
cy.get(FIVE_ROWS).click();
};

export const goToSecondPage = () => {
cy.get(SECOND_PAGE_SELECTOR).click({ force: true });
};

export const changeToThreeHundredRowsPerPage = () => {
cy.get(PAGINATION_POPOVER_BTN).click({ force: true });
cy.get(THREE_HUNDRED_ROWS).click();
Expand Down Expand Up @@ -136,11 +124,6 @@ export const waitForRuleToBeActivated = () => {
};

export const waitForRulesToBeLoaded = () => {
cy.get(FROSTED_LOADING_RULES_TABLE).should('exist');
cy.get(FROSTED_LOADING_RULES_TABLE).should('not.exist');
};

export const waitForRulesToBeAutoRefreshed = () => {
cy.get(ASYNC_LOADING_PROGRESS).should('exist');
cy.get(ASYNC_LOADING_PROGRESS).should('not.exist');
};
Expand Down

0 comments on commit 4a33720

Please sign in to comment.