Skip to content

Commit

Permalink
unskips and add more fields to the 'Displays enrichment matched.* fie…
Browse files Browse the repository at this point in the history
…lds on the timeline' cypress test
  • Loading branch information
MadameSheema committed Nov 30, 2021
1 parent e52610f commit ac652c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ describe('CTI Enrichment', () => {
goToRuleDetails();
});

it.skip('Displays enrichment matched.* fields on the timeline', () => {
it('Displays enrichment matched.* fields on the timeline', () => {
const expectedFields = {
'threat.enrichments.matched.atomic': getNewThreatIndicatorRule().atomic,
'threat.enrichments.matched.type': 'indicator_match_rule',
'threat.enrichments.matched.type': getNewThreatIndicatorRule().matchedType,
'threat.enrichments.matched.field': getNewThreatIndicatorRule().indicatorMappingField,
'threat.enrichments.matched.id': getNewThreatIndicatorRule().matchedId,
'threat.enrichments.matched.index': getNewThreatIndicatorRule().matchedIndex,
};
const fields = Object.keys(expectedFields) as Array<keyof typeof expectedFields>;

Expand Down
6 changes: 6 additions & 0 deletions x-pack/plugins/security_solution/cypress/objects/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ export interface ThreatIndicatorRule extends CustomRule {
threatIndicatorPath: string;
type?: string;
atomic?: string;
matchedType?: string;
matchedId?: string;
matchedIndex?: string;
}

export interface MachineLearningRule {
Expand Down Expand Up @@ -407,6 +410,9 @@ export const getNewThreatIndicatorRule = (): ThreatIndicatorRule => ({
timeline: getIndicatorMatchTimelineTemplate(),
maxSignals: 100,
threatIndicatorPath: 'threat.indicator',
matchedType: 'indicator_match_rule',
matchedId: '84cf452c1e0375c3d4412cb550bd1783358468a3b3b777da4829d72c7d6fb74f',
matchedIndex: 'logs-ti_abusech.malware',
});

export const duplicatedRuleName = `${getNewThreatIndicatorRule().name} [Duplicate]`;
Expand Down

0 comments on commit ac652c9

Please sign in to comment.