[8.15] [ResponseOps][Cases] Edits case template text (#187610) (#187808)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[ResponseOps][Cases] Edits case template text
(#187610)](https://github.com/elastic/kibana/pull/187610)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2024-07-08T23:42:06Z","message":"[ResponseOps][Cases]
Edits case template text
(#187610)","sha":"6a2abd68091b86b4e5b02359e346300371346f2a","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","ui-copy","v8.15.0","v8.16.0"],"title":"[ResponseOps][Cases]
Edits case template
text","number":187610,"url":"https://github.com/elastic/kibana/pull/187610","mergeCommit":{"message":"[ResponseOps][Cases]
Edits case template text
(#187610)","sha":"6a2abd68091b86b4e5b02359e346300371346f2a"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187610","number":187610,"mergeCommit":{"message":"[ResponseOps][Cases]
Edits case template text
(#187610)","sha":"6a2abd68091b86b4e5b02359e346300371346f2a"}}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
This commit is contained in:
Kibana Machine 2024-07-09 10:22:59 +02:00 committed by GitHub
parent ab6ec61c68
commit 71c6761a06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 12 additions and 14 deletions

View file

@ -22,11 +22,11 @@ export const DELETE_CASE = (quantity: number = 1) =>
});
export const COPY_ID_ACTION_LABEL = i18n.translate('xpack.cases.caseView.copyID', {
defaultMessage: 'Copy Case ID',
defaultMessage: 'Copy case ID',
});
export const COPY_ID_ACTION_SUCCESS = i18n.translate('xpack.cases.caseView.copyIDSuccess', {
defaultMessage: 'Copied Case ID to clipboard',
defaultMessage: 'Copied case ID to clipboard',
});
export const NAME = i18n.translate('xpack.cases.caseView.name', {

View file

@ -50,7 +50,7 @@ describe('useCopyIDAction', () => {
/>,
"key": "cases-action-copy-id",
"name": <EuiTextColor>
Copy Case ID
Copy case ID
</EuiTextColor>,
"onClick": [Function],
}
@ -84,7 +84,7 @@ describe('useCopyIDAction', () => {
await waitFor(() => {
expect(onActionSuccess).toHaveBeenCalled();
expect(appMockRender.coreStart.notifications.toasts.addSuccess).toHaveBeenCalledWith({
title: 'Copied Case ID to clipboard',
title: 'Copied case ID to clipboard',
className: 'eui-textBreakWord',
});
});

View file

@ -766,7 +766,7 @@ describe('CommonFlyout ', () => {
expect(props.onSaveField).not.toHaveBeenCalled();
});
expect(await screen.findByText('A Template name is required.')).toBeInTheDocument();
expect(await screen.findByText('Template name is required.')).toBeInTheDocument();
});
it('shows error if template name is too long', async () => {

View file

@ -55,7 +55,7 @@ export const TEMPLATE_LABEL = i18n.translate('xpack.cases.create.templateLabel',
});
export const TEMPLATE_HELP_TEXT = i18n.translate('xpack.cases.create.templateHelpText', {
defaultMessage: 'Selecting a template will pre-fill certain case fields below',
defaultMessage: 'Select a template to use its default field values.',
});
export const SOLUTION_SELECTOR_LABEL = i18n.translate('xpack.cases.create.solutionSelectorLabel', {

View file

@ -191,7 +191,7 @@ describe('Create ', () => {
userEvent.click(await screen.findByText('Submit'));
expect(
await screen.findByText(`A ${customFieldConfiguration.label} is required.`)
await screen.findByText(`${customFieldConfiguration.label} is required.`)
).toBeInTheDocument();
await waitFor(() => {

View file

@ -380,7 +380,7 @@ describe('Edit ', () => {
userEvent.click(await screen.findByTestId('case-text-custom-field-edit-button-test_key_1'));
userEvent.clear(await screen.findByTestId('case-text-custom-field-form-field-test_key_1'));
expect(await screen.findByText('A My test label 1 is required.')).toBeInTheDocument();
expect(await screen.findByText('My test label 1 is required.')).toBeInTheDocument();
});
it('does not shows a validation error if the field is not required', async () => {

View file

@ -77,7 +77,7 @@ export const REQUIRED = i18n.translate('xpack.cases.customFields.required', {
export const REQUIRED_FIELD = (fieldName: string): string =>
i18n.translate('xpack.cases.customFields.requiredField', {
values: { fieldName },
defaultMessage: 'A {fieldName} is required.',
defaultMessage: '{fieldName} is required.',
});
export const EDIT_CUSTOM_FIELDS_ARIA_LABEL = (customFieldLabel: string) =>

View file

@ -14,8 +14,7 @@ export const TEMPLATE_TITLE = i18n.translate('xpack.cases.templates.title', {
});
export const TEMPLATE_DESCRIPTION = i18n.translate('xpack.cases.templates.description', {
defaultMessage:
'Add Case Templates to automatically define the case fields while creating a new case. A user can choose to create an empty case or based on a preset template. Templates allow to auto-populate values when creating new cases.',
defaultMessage: 'Create templates that automatically populate values in new cases.',
});
export const NO_TEMPLATES = i18n.translate('xpack.cases.templates.noTemplates', {
@ -37,7 +36,7 @@ export const REQUIRED = i18n.translate('xpack.cases.templates.required', {
export const REQUIRED_FIELD = (fieldName: string): string =>
i18n.translate('xpack.cases.templates.requiredField', {
values: { fieldName },
defaultMessage: 'A {fieldName} is required.',
defaultMessage: '{fieldName} is required.',
});
export const TEMPLATE_NAME = i18n.translate('xpack.cases.templates.templateName', {
@ -45,8 +44,7 @@ export const TEMPLATE_NAME = i18n.translate('xpack.cases.templates.templateName'
});
export const TEMPLATE_TAGS_HELP = i18n.translate('xpack.cases.templates.templateTagsHelp', {
defaultMessage:
'Type one or more custom identifying tags for this template. Please enter after each tag to begin a new one',
defaultMessage: 'Separate tags with a line break.',
});
export const TEMPLATE_FIELDS = i18n.translate('xpack.cases.templates.templateFields', {