diff --git a/x-pack/plugins/security_solution/cypress/integration/exceptions/exceptions_table.spec.ts b/x-pack/plugins/security_solution/cypress/integration/exceptions/exceptions_table.spec.ts index d3bd4d210378b4..b037c4f6d62ce8 100644 --- a/x-pack/plugins/security_solution/cypress/integration/exceptions/exceptions_table.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/exceptions/exceptions_table.spec.ts @@ -28,6 +28,7 @@ import { } from '../../screens/exceptions'; import { createExceptionList } from '../../tasks/api_calls/exceptions'; import { esArchiverResetKibana } from '../../tasks/es_archiver'; +import { TOASTER } from '../../screens/alerts_detection_rules'; const getExceptionList1 = () => ({ ...getExceptionList(), @@ -79,11 +80,14 @@ describe('Exceptions Table', () => { waitForExceptionsTableToBeLoaded(); exportExceptionList(); - cy.wait('@export').then(({ response }) => - cy - .wrap(response?.body) - .should('eql', expectedExportedExceptionList(this.exceptionListResponse)) - ); + cy.wait('@export').then(({ response }) => { + cy.wrap(response?.body).should( + 'eql', + expectedExportedExceptionList(this.exceptionListResponse) + ); + + cy.get(TOASTER).should('have.text', 'Exception list export success'); + }); }); it('Filters exception lists on search', () => { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.tsx index 72984a8bcbe923..0d01872a904e3e 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.tsx @@ -96,7 +96,7 @@ export const ExceptionListsTable = React.memo(() => { const [exportingListIds, setExportingListIds] = useState([]); const [exportDownload, setExportDownload] = useState<{ name?: string; blob?: Blob }>({}); const { navigateToUrl } = application; - const { addError } = useAppToasts(); + const { addError, addSuccess } = useAppToasts(); const handleDeleteSuccess = useCallback( (listId?: string) => () => { @@ -165,9 +165,10 @@ export const ExceptionListsTable = React.memo(() => { const handleExportSuccess = useCallback( (listId: string) => (blob: Blob): void => { + addSuccess(i18n.EXCEPTION_EXPORT_SUCCESS); setExportDownload({ name: listId, blob }); }, - [] + [addSuccess] ); const handleExportError = useCallback(