Skip to content

Commit

Permalink
[Security Solution] Maintenance Window callout: Improve UI copy after…
Browse files Browse the repository at this point in the history
… tech writer review (elastic#157076)

## Summary

Tweaked UI wording after consulting with a tech writer

<img width="1329" alt="Screenshot 2023-05-08 at 22 51 39"
src="https://user-images.githubusercontent.com/15949146/236932465-43e6181e-c2dc-453a-b109-0ab22bbae695.png">

**Addresses:** elastic#155099
**Main PR:** elastic#155386

(cherry picked from commit 352c8d8)
  • Loading branch information
nikitaindik committed May 9, 2023
1 parent 89de048 commit 45a9996
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('MaintenanceWindowCallout', () => {

const { findAllByText } = render(<MaintenanceWindowCallout />, { 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);
});

Expand All @@ -119,7 +119,7 @@ describe('MaintenanceWindowCallout', () => {

const { findAllByText } = render(<MaintenanceWindowCallout />, { 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);
});

Expand All @@ -128,7 +128,7 @@ describe('MaintenanceWindowCallout', () => {

const { findByText } = render(<MaintenanceWindowCallout />, { wrapper: TestProviders });

expect(await findByText('A maintenance window is currently running')).toBeInTheDocument();
expect(await findByText('Maintenance window is running')).toBeInTheDocument();
expect(fetchActiveMaintenanceWindowsMock).toHaveBeenCalledTimes(1);
});

Expand Down Expand Up @@ -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.',
});
});
});
Expand Down Expand Up @@ -227,6 +227,6 @@ describe('MaintenanceWindowCallout', () => {

const { findByText } = render(<MaintenanceWindowCallout />, { wrapper: TestProviders });

expect(await findByText('A maintenance window is currently running')).toBeInTheDocument();
expect(await findByText('Maintenance window is running')).toBeInTheDocument();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
}
);

0 comments on commit 45a9996

Please sign in to comment.