diff --git a/x-pack/plugins/cases/public/components/files/file_type.test.tsx b/x-pack/plugins/cases/public/components/files/file_type.test.tsx index 8d4fd4c0eabde..8d2c782ee0aae 100644 --- a/x-pack/plugins/cases/public/components/files/file_type.test.tsx +++ b/x-pack/plugins/cases/public/components/files/file_type.test.tsx @@ -27,6 +27,7 @@ describe('getFileType', () => { icon: 'document', displayName: 'File Attachment Type', getAttachmentViewObject: expect.any(Function), + getAttachmentRemovalObject: expect.any(Function), }); }); @@ -184,4 +185,11 @@ describe('getFileType', () => { ); }); }); + + describe('getFileAttachmentRemovalObject', () => { + it('event renders the right message', async () => { + // @ts-ignore + expect(fileType.getAttachmentRemovalObject().event).toBe('removed file'); + }); + }); }); diff --git a/x-pack/plugins/cases/public/components/files/file_type.tsx b/x-pack/plugins/cases/public/components/files/file_type.tsx index 271bf3008e70e..f8b434d984861 100644 --- a/x-pack/plugins/cases/public/components/files/file_type.tsx +++ b/x-pack/plugins/cases/public/components/files/file_type.tsx @@ -103,4 +103,5 @@ export const getFileType = (): ExternalReferenceAttachmentType => ({ icon: 'document', displayName: 'File Attachment Type', getAttachmentViewObject: getFileAttachmentViewObject, + getAttachmentRemovalObject: () => ({ event: i18n.REMOVED_FILE }), }); diff --git a/x-pack/plugins/cases/public/components/files/translations.tsx b/x-pack/plugins/cases/public/components/files/translations.tsx index 4023c5b18cea8..2fd8ed28c6aa4 100644 --- a/x-pack/plugins/cases/public/components/files/translations.tsx +++ b/x-pack/plugins/cases/public/components/files/translations.tsx @@ -113,3 +113,7 @@ export const DELETE = i18n.translate('xpack.cases.caseView.files.delete', { export const DELETE_FILE_TITLE = i18n.translate('xpack.cases.caseView.files.deleteThisFile', { defaultMessage: 'Delete this file?', }); + +export const REMOVED_FILE = i18n.translate('xpack.cases.caseView.files.removedFile', { + defaultMessage: 'removed file', +});