Skip to content

Commit

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

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Security Solution] Maintenance Window callout: Improve UI copy after
tech writer review
(#157076)](#157076)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nikita
Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2023-05-09T12:34:29Z","message":"[Security
Solution] Maintenance Window callout: Improve UI copy after tech writer
review (#157076)\n\n## Summary\r\n\r\nTweaked UI wording after
consulting with a tech writer \r\n\r\n<img width=\"1329\"
alt=\"Screenshot 2023-05-08 at 22 51
39\"\r\nsrc=\"https://user-images.githubusercontent.com/15949146/236932465-43e6181e-c2dc-453a-b109-0ab22bbae695.png\">\r\n\r\n**Addresses:**
https://github.com/elastic/kibana/issues/155099\r\n**Main PR:**
https://github.com/elastic/kibana/pull/155386","sha":"352c8d8b1f7dbdadb8d2dbf1d5192e78a43a67af","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection
Rules","ui-copy","v8.8.0","v8.9.0"],"number":157076,"url":"https://github.com/elastic/kibana/pull/157076","mergeCommit":{"message":"[Security
Solution] Maintenance Window callout: Improve UI copy after tech writer
review (#157076)\n\n## Summary\r\n\r\nTweaked UI wording after
consulting with a tech writer \r\n\r\n<img width=\"1329\"
alt=\"Screenshot 2023-05-08 at 22 51
39\"\r\nsrc=\"https://user-images.githubusercontent.com/15949146/236932465-43e6181e-c2dc-453a-b109-0ab22bbae695.png\">\r\n\r\n**Addresses:**
https://github.com/elastic/kibana/issues/155099\r\n**Main PR:**
https://github.com/elastic/kibana/pull/155386","sha":"352c8d8b1f7dbdadb8d2dbf1d5192e78a43a67af"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157076","number":157076,"mergeCommit":{"message":"[Security
Solution] Maintenance Window callout: Improve UI copy after tech writer
review (#157076)\n\n## Summary\r\n\r\nTweaked UI wording after
consulting with a tech writer \r\n\r\n<img width=\"1329\"
alt=\"Screenshot 2023-05-08 at 22 51
39\"\r\nsrc=\"https://user-images.githubusercontent.com/15949146/236932465-43e6181e-c2dc-453a-b109-0ab22bbae695.png\">\r\n\r\n**Addresses:**
https://github.com/elastic/kibana/issues/155099\r\n**Main PR:**
https://github.com/elastic/kibana/pull/155386","sha":"352c8d8b1f7dbdadb8d2dbf1d5192e78a43a67af"}}]}]
BACKPORT-->

Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
  • Loading branch information
3 people authored May 20, 2023
1 parent 86ff1e6 commit 1f033b4
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 1f033b4

Please sign in to comment.