From 567ccd5dd299e26d0b0e185b2c7d43ff344957c7 Mon Sep 17 00:00:00 2001 From: Ece Ozalp Date: Tue, 17 Aug 2021 15:07:50 -0400 Subject: [PATCH] fixes indicator_match_rule.spec.ts --- .../integration/detection_rules/indicator_match_rule.spec.ts | 2 +- .../security_solution/cypress/tasks/create_new_rule.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/security_solution/cypress/integration/detection_rules/indicator_match_rule.spec.ts b/x-pack/plugins/security_solution/cypress/integration/detection_rules/indicator_match_rule.spec.ts index 1fde21a00fc0a..8721b59d85556 100644 --- a/x-pack/plugins/security_solution/cypress/integration/detection_rules/indicator_match_rule.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/detection_rules/indicator_match_rule.spec.ts @@ -116,7 +116,7 @@ describe('indicator match', () => { const expectedTags = getNewThreatIndicatorRule().tags.join(''); const expectedMitre = formatMitreAttackDescription(getNewThreatIndicatorRule().mitre); const expectedNumberOfRules = 1; - const expectedNumberOfAlerts = 1; + const expectedNumberOfAlerts = '1 alert'; before(() => { cleanKibana(); diff --git a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts index 47225227485f0..368f80a89a7ad 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts @@ -394,7 +394,7 @@ export const fillIndexAndIndicatorIndexPattern = ( ) => { getIndexPatternClearButton().click(); getIndicatorIndex().type(`${indexPattern}{enter}`); - getIndicatorIndicatorIndex().type(`${indicatorIndex}{enter}`); + getIndicatorIndicatorIndex().type(`{backspace}{enter}${indicatorIndex}{enter}`); }; export const fillEmailConnectorForm = (connector: EmailConnector = getEmailConnector()) => { @@ -447,7 +447,7 @@ export const getIndicatorIndicatorIndex = () => cy.get(THREAT_MATCH_INDICATOR_INDICATOR_INDEX).eq(0); /** Returns the index pattern's clear button */ -export const getIndexPatternClearButton = () => cy.get(COMBO_BOX_CLEAR_BTN).first(); +export const getIndexPatternClearButton = () => cy.get(COMBO_BOX_CLEAR_BTN).should('exist').first(); /** Returns the custom query input */ export const getCustomQueryInput = () => cy.get(THREAT_MATCH_CUSTOM_QUERY_INPUT).eq(0);