Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Maintenance Window callout: Improve UI copy after tech writer review #157076

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.',
}
);