Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { newRule, totalNumberOfPrebuiltRulesInEsArchive } from '../objects/rule';
import { newRule, totalNumberOfPrebuiltRulesInEsArchiveCustomRule } from '../objects/rule';

import {
CUSTOM_RULES_BTN,
Expand Down Expand Up @@ -64,7 +64,7 @@ import { loginAndWaitForPageWithoutDateRange } from '../tasks/login';

import { ALERTS_URL } from '../urls/navigation';

describe.skip('Detection rules, custom', () => {
describe('Detection rules, custom', () => {
before(() => {
esArchiverLoad('custom_rule_with_timeline');
});
Expand All @@ -89,7 +89,7 @@ describe.skip('Detection rules, custom', () => {
changeToThreeHundredRowsPerPage();
waitForRulesToBeLoaded();

const expectedNumberOfRules = totalNumberOfPrebuiltRulesInEsArchive + 1;
const expectedNumberOfRules = totalNumberOfPrebuiltRulesInEsArchiveCustomRule + 1;
cy.get(RULES_TABLE).then(($table) => {
cy.wrap($table.find(RULES_ROW).length).should('eql', expectedNumberOfRules);
});
Expand Down
6 changes: 4 additions & 2 deletions x-pack/plugins/security_solution/cypress/objects/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export const totalNumberOfPrebuiltRules = rawRules.length;

export const totalNumberOfPrebuiltRulesInEsArchive = 127;

export const totalNumberOfPrebuiltRulesInEsArchiveCustomRule = 145;

interface Mitre {
tactic: string;
techniques: string[];
Expand Down Expand Up @@ -57,7 +59,7 @@ const mitre2: Mitre = {
};

export const newRule: CustomRule = {
customQuery: 'host.name: *',
customQuery: 'host.name: * ',
name: 'New Rule Test',
description: 'The new rule description.',
severity: 'High',
Expand All @@ -67,7 +69,7 @@ export const newRule: CustomRule = {
falsePositivesExamples: ['False1', 'False2'],
mitre: [mitre1, mitre2],
note: '# test markdown',
timelineId: '352c6110-9ffb-11ea-b3d8-857d6042d9bd',
timelineId: '3270f530-bc84-11ea-b73f-89980a6a1ce7',
};

export const machineLearningRule: MachineLearningRule = {
Expand Down
Binary file not shown.
Loading