unskips and add more fields to the 'Displays enrichment matched.* fields on the timeline' cypress test (#119938) (#119957)

Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
This commit is contained in:
Kibana Machine 2021-11-30 09:28:19 -05:00 committed by GitHub
parent 017a70f59c
commit 4415be95a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -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>;

View file

@ -80,6 +80,9 @@ export interface ThreatIndicatorRule extends CustomRule {
threatIndicatorPath: string;
type?: string;
atomic?: string;
matchedType?: string;
matchedId?: string;
matchedIndex?: string;
}
export interface MachineLearningRule {
@ -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]`;