Skip to content

Commit

Permalink
fixes failures
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema committed May 5, 2020
1 parent 3b8ad1c commit 32cf919
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ describe('Signal detection rules, prebuilt rules', () => {

describe('Deleting prebuilt rules', () => {
beforeEach(() => {
const expectedNumberOfRules = totalNumberOfPrebuiltRules;
const expectedElasticRulesBtnText = `Elastic rules (${expectedNumberOfRules})`;

esArchiverLoadEmptyKibana();
loginAndWaitForPageWithoutDateRange(DETECTIONS);
waitForSignalsPanelToBeLoaded();
Expand All @@ -79,6 +82,17 @@ describe('Deleting prebuilt rules', () => {
waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded();
loadPrebuiltDetectionRules();
waitForPrebuiltDetectionRulesToBeLoaded();

cy.get(ELASTIC_RULES_BTN)
.invoke('text')
.should('eql', expectedElasticRulesBtnText);

changeToThreeHundredRowsPerPage();
waitForRulesToBeLoaded();

cy.get(RULES_TABLE).then($table => {
cy.wrap($table.find(RULES_ROW).length).should('eql', expectedNumberOfRules);
});
});

afterEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/siem/cypress/objects/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { rawRules } from '../../server/lib/detection_engine/rules/prepackaged_ru

export const totalNumberOfPrebuiltRules = rawRules.length;

export const totalLoadedRules = 127;
export const totalNumberOfPrebuiltRulesInEsArchive = 127;

interface Mitre {
tactic: string;
Expand Down

0 comments on commit 32cf919

Please sign in to comment.