From 5842d2dbbfd88fa34b6fdae393d724e5df95d882 Mon Sep 17 00:00:00 2001 From: Nick Peihl Date: Tue, 5 Dec 2023 14:03:08 -0500 Subject: [PATCH 1/2] Prevent overflowing dashboard title on save toast --- .../lib/save_dashboard_state.test.ts | 1 + .../dashboard_content_management/lib/save_dashboard_state.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.test.ts b/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.test.ts index b44ae044cd50a..43f620c8a5f4b 100644 --- a/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.test.ts +++ b/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.test.ts @@ -92,6 +92,7 @@ describe('Save dashboard state', () => { ); expect(allServices.notifications.toasts.addSuccess).toHaveBeenCalledWith({ title: `Dashboard 'BooToo' was saved`, + className: 'eui-textBreakWord', 'data-test-subj': 'saveDashboardSuccess', }); }); diff --git a/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.ts b/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.ts index 501d95976dc10..3469aed639a4a 100644 --- a/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.ts +++ b/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.ts @@ -201,6 +201,7 @@ export const saveDashboardState = async ({ if (newId) { toasts.addSuccess({ title: dashboardSaveToastStrings.getSuccessString(currentState.title), + className: 'eui-textBreakWord', 'data-test-subj': 'saveDashboardSuccess', }); From 8655fc6da9ea92a36b3fdc9937f5b97f31ce2c2b Mon Sep 17 00:00:00 2001 From: Nick Peihl Date: Tue, 5 Dec 2023 16:29:52 -0500 Subject: [PATCH 2/2] Fix test --- .../lib/save_dashboard_state.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.test.ts b/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.test.ts index 43f620c8a5f4b..86221b8b8110a 100644 --- a/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.test.ts +++ b/src/plugins/dashboard/public/services/dashboard_content_management/lib/save_dashboard_state.test.ts @@ -68,6 +68,7 @@ describe('Save dashboard state', () => { ); expect(allServices.notifications.toasts.addSuccess).toHaveBeenCalledWith({ title: `Dashboard 'BOO' was saved`, + className: 'eui-textBreakWord', 'data-test-subj': 'saveDashboardSuccess', }); });