From 45a999636c7ee32f1e8a9c5488d0aade5d1fa701 Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Tue, 9 May 2023 14:34:29 +0200 Subject: [PATCH] [Security Solution] Maintenance Window callout: Improve UI copy after tech writer review (#157076) ## Summary Tweaked UI wording after consulting with a tech writer Screenshot 2023-05-08 at 22 51 39 **Addresses:** https://github.com/elastic/kibana/issues/155099 **Main PR:** https://github.com/elastic/kibana/pull/155386 (cherry picked from commit 352c8d8b1f7dbdadb8d2dbf1d5192e78a43a67af) --- .../e2e/detection_rules/maintenance_window.cy.ts | 2 +- .../maintenance_window_callout.test.tsx | 12 ++++++------ .../maintenance_window_callout/translations.ts | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/maintenance_window.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/maintenance_window.cy.ts index af534d325ebca..bdd481762c29b 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/maintenance_window.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/maintenance_window.cy.ts @@ -53,6 +53,6 @@ describe('Maintenance window callout on Rule Management page', () => { it('Displays the callout when there are running maintenance windows', () => { visit(DETECTIONS_RULE_MANAGEMENT_URL); - cy.contains('A maintenance window is currently running'); + cy.contains('Maintenance window is running'); }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/maintenance_window_callout/maintenance_window_callout.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/maintenance_window_callout/maintenance_window_callout.test.tsx index cc40e53f65667..c7ce00f50e881 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/maintenance_window_callout/maintenance_window_callout.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/maintenance_window_callout/maintenance_window_callout.test.tsx @@ -107,7 +107,7 @@ describe('MaintenanceWindowCallout', () => { const { findAllByText } = render(, { wrapper: TestProviders }); - expect(await findAllByText('A maintenance window is currently running')).toHaveLength(1); + expect(await findAllByText('Maintenance window is running')).toHaveLength(1); expect(fetchActiveMaintenanceWindowsMock).toHaveBeenCalledTimes(1); }); @@ -119,7 +119,7 @@ describe('MaintenanceWindowCallout', () => { const { findAllByText } = render(, { wrapper: TestProviders }); - expect(await findAllByText('A maintenance window is currently running')).toHaveLength(1); + expect(await findAllByText('Maintenance window is running')).toHaveLength(1); expect(fetchActiveMaintenanceWindowsMock).toHaveBeenCalledTimes(1); }); @@ -128,7 +128,7 @@ describe('MaintenanceWindowCallout', () => { const { findByText } = render(, { wrapper: TestProviders }); - expect(await findByText('A maintenance window is currently running')).toBeInTheDocument(); + expect(await findByText('Maintenance window is running')).toBeInTheDocument(); expect(fetchActiveMaintenanceWindowsMock).toHaveBeenCalledTimes(1); }); @@ -184,8 +184,8 @@ describe('MaintenanceWindowCallout', () => { await waitFor(() => { expect(appToastsMock.addError).toHaveBeenCalledTimes(1); expect(appToastsMock.addError).toHaveBeenCalledWith(mockError, { - title: 'Failed to check if any maintenance window is currently running', - toastMessage: "Notification actions won't run while a maintenance window is running.", + title: 'Failed to check if maintenance windows are active', + toastMessage: 'Rule notifications are stopped while the maintenance window is running.', }); }); }); @@ -227,6 +227,6 @@ describe('MaintenanceWindowCallout', () => { const { findByText } = render(, { wrapper: TestProviders }); - expect(await findByText('A maintenance window is currently running')).toBeInTheDocument(); + expect(await findByText('Maintenance window is running')).toBeInTheDocument(); }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/maintenance_window_callout/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/maintenance_window_callout/translations.ts index 21071aee618a1..a3a7e9c1fdbc7 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/maintenance_window_callout/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/maintenance_window_callout/translations.ts @@ -10,27 +10,27 @@ import { i18n } from '@kbn/i18n'; export const MAINTENANCE_WINDOW_RUNNING = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleManagementUi.maintenanceWindowCallout.maintenanceWindowActive', { - defaultMessage: 'A maintenance window is currently running', + defaultMessage: 'Maintenance window is running', } ); export const MAINTENANCE_WINDOW_RUNNING_DESCRIPTION = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleManagementUi.maintenanceWindowCallout.maintenanceWindowActiveDescription', { - defaultMessage: "Notification actions won't run while a maintenance window is running.", + defaultMessage: 'Rule notifications are stopped while the maintenance window is running.', } ); export const FETCH_ERROR = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleManagementUi.maintenanceWindowCallout.fetchError', { - defaultMessage: 'Failed to check if any maintenance window is currently running', + defaultMessage: 'Failed to check if maintenance windows are active', } ); export const FETCH_ERROR_DESCRIPTION = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleManagementUi.maintenanceWindowCallout.fetchErrorDescription', { - defaultMessage: "Notification actions won't run while a maintenance window is running.", + defaultMessage: 'Rule notifications are stopped while the maintenance window is running.', } );