diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx index 83b4c63484dd3..141177f4a6b72 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx @@ -15,6 +15,7 @@ import { EventFieldsData } from '../types'; import { TimelineId } from '../../../../../common/types'; import { AlertSummaryRow } from '../helpers'; import { useAlertPrevalence } from '../../../containers/alerts/use_alert_prevalence'; +import { getEmptyValue } from '../../../components/empty_value'; jest.mock('../../../lib/kibana'); jest.mock('../../../containers/alerts/use_alert_prevalence', () => ({ @@ -75,7 +76,7 @@ describe('PrevalenceCellRenderer', () => { }); describe('When an error was returned', () => { - test('it should return null', async () => { + test('it should return empty value placeholder', async () => { mockUseAlertPrevalence.mockImplementation(() => ({ loading: false, count: 123, @@ -88,6 +89,7 @@ describe('PrevalenceCellRenderer', () => { ); expect(container.getElementsByClassName('euiLoadingSpinner')).toHaveLength(0); expect(screen.queryByText('123')).toBeNull(); + expect(screen.queryByText(getEmptyValue())).toBeTruthy(); }); }); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx index ed8b610b39d1f..639e881f806f4 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { EuiLoadingSpinner } from '@elastic/eui'; import { AlertSummaryRow } from '../helpers'; +import { getEmptyValue } from '../../../components/empty_value'; import { useAlertPrevalence } from '../../../containers/alerts/use_alert_prevalence'; const PrevalenceCell = React.memo( @@ -23,7 +24,7 @@ const PrevalenceCell = React.memo( if (loading) { return ; } else if (error) { - return null; + return <>{getEmptyValue()}; } return <>{count};