[Security Solution][RAC][Cypress] Unskip some tests (#117596)

* Reenable cypress tests for rules

* Indicator match is not yet passing

* Update refs

* Fix eql alert generation original_time and building_block_type

* Unskip a few more tests

* Update field names in jest tests

* Fix unit tests / cypress tests

* Have to keep this one skipped for now

* Fix some more tests?

* cleanup

* Fix translation
This commit is contained in:
Madison Caldwell 2021-11-23 15:28:23 -05:00 committed by GitHub
parent 7f6d222964
commit c3484ae132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 166 additions and 79 deletions

View file

@ -15,7 +15,11 @@ import {
EuiHorizontalRule,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { ALERT_RULE_NAME } from '@kbn/rule-data-utils/technical_field_names';
import {
ALERT_REASON,
ALERT_RULE_NAME,
ALERT_RULE_UUID,
} from '@kbn/rule-data-utils/technical_field_names';
import { get } from 'lodash';
import moment from 'moment';
import React, { ComponentType, useCallback, useMemo } from 'react';
@ -161,8 +165,8 @@ const EventRenderedViewComponent = ({
truncateText: false,
mobileOptions: { show: true },
render: (name: unknown, item: TimelineItem) => {
const ruleName = get(item, `ecs.signal.rule.name`); /* `ecs.${ALERT_RULE_NAME}`*/
const ruleId = get(item, `ecs.signal.rule.id`); /* `ecs.${ALERT_RULE_ID}`*/
const ruleName = get(item, `ecs.signal.rule.name`) ?? get(item, `ecs.${ALERT_RULE_NAME}`);
const ruleId = get(item, `ecs.signal.rule.id`) ?? get(item, `ecs.${ALERT_RULE_UUID}`);
return <RuleName name={ruleName} id={ruleId} />;
},
},
@ -175,7 +179,7 @@ const EventRenderedViewComponent = ({
mobileOptions: { show: true },
render: (name: unknown, item: TimelineItem) => {
const ecsData = get(item, 'ecs');
const reason = get(item, `ecs.signal.reason`); /* `ecs.${ALERT_REASON}`*/
const reason = get(item, `ecs.signal.reason`) ?? get(item, `ecs.${ALERT_REASON}`);
const rowRenderersValid = rowRenderers.filter((rowRenderer) =>
rowRenderer.isInstance(ecsData)
);

View file

@ -85,7 +85,7 @@ export const buildTimelineEventsAllQuery = ({
track_total_hits: true,
sort: getSortField(sort),
fields,
_source: ['signal.*'],
_source: ['signal.*', 'kibana.alert.*'],
},
};