Skip to content

Commit

Permalink
Fix cypress Rule Creation test
Browse files Browse the repository at this point in the history
Timeline template moved, and so tests broke.
  • Loading branch information
rylnd committed Mar 23, 2020
1 parent 35cdd06 commit ac1a923
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import {
ABOUT_SEVERITY,
ABOUT_STEP,
ABOUT_TAGS,
ABOUT_TIMELINE,
ABOUT_URLS,
DEFINITION_CUSTOM_QUERY,
DEFINITION_INDEX_PATTERNS,
DEFINITION_TIMELINE,
DEFINITION_STEP,
RULE_NAME_HEADER,
SCHEDULE_LOOPBACK,
Expand Down Expand Up @@ -170,10 +170,6 @@ describe('Signal detection rules', () => {
.eq(ABOUT_RISK)
.invoke('text')
.should('eql', newRule.riskScore);
cy.get(ABOUT_STEP)
.eq(ABOUT_TIMELINE)
.invoke('text')
.should('eql', 'Default blank timeline');
cy.get(ABOUT_STEP)
.eq(ABOUT_URLS)
.invoke('text')
Expand Down Expand Up @@ -202,6 +198,10 @@ describe('Signal detection rules', () => {
.eq(DEFINITION_CUSTOM_QUERY)
.invoke('text')
.should('eql', `${newRule.customQuery} `);
cy.get(DEFINITION_STEP)
.eq(DEFINITION_TIMELINE)
.invoke('text')
.should('eql', 'Default blank timeline');

cy.get(SCHEDULE_STEP)
.eq(SCHEDULE_RUNS)
Expand Down
12 changes: 6 additions & 6 deletions x-pack/legacy/plugins/siem/cypress/screens/rule_details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/

export const ABOUT_FALSE_POSITIVES = 4;
export const ABOUT_FALSE_POSITIVES = 3;

export const ABOUT_MITRE = 5;
export const ABOUT_MITRE = 4;

export const ABOUT_RULE_DESCRIPTION = '[data-test-subj=stepAboutRuleDetailsToggleDescriptionText]';

Expand All @@ -16,14 +16,14 @@ export const ABOUT_SEVERITY = 0;

export const ABOUT_STEP = '[data-test-subj="aboutRule"] .euiDescriptionList__description';

export const ABOUT_TAGS = 6;
export const ABOUT_TAGS = 5;

export const ABOUT_TIMELINE = 2;

export const ABOUT_URLS = 3;
export const ABOUT_URLS = 2;

export const DEFINITION_CUSTOM_QUERY = 1;

export const DEFINITION_TIMELINE = 3;

export const DEFINITION_INDEX_PATTERNS =
'[data-test-subj=definitionRule] [data-test-subj="listItemColumnStepRuleDescription"] .euiDescriptionList__description .euiBadge__text';

Expand Down

0 comments on commit ac1a923

Please sign in to comment.