From 2a0e4d2051b01a28606bc83df12930944070e31f Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Mon, 24 Apr 2023 13:18:21 +0200 Subject: [PATCH 1/5] Fix tests from ingest pipelines --- .../helpers/pipeline_form.helpers.ts | 3 +- .../ingest_pipelines_create.test.tsx | 17 +++++++ .../__jest__/test_pipeline.helpers.tsx | 10 ++--- .../load_from_json/modal_provider.test.tsx | 45 ++++++++++++++----- .../load_from_json/modal_provider.tsx | 2 +- .../tab_documents/tab_documents.tsx | 2 +- .../pipeline_form/pipeline_form_fields.tsx | 2 +- 7 files changed, 61 insertions(+), 20 deletions(-) diff --git a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipeline_form.helpers.ts b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipeline_form.helpers.ts index b4014eca85775..25603db59f16a 100644 --- a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipeline_form.helpers.ts +++ b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipeline_form.helpers.ts @@ -44,7 +44,8 @@ export const getFormActions = (testBed: TestBed) => { }; const setMetaField = (value: object) => { - find('metaEditor').simulate('change', { jsonString: JSON.stringify(value) }); + find('metaEditor').getDOMNode().setAttribute('data-currentvalue', JSON.stringify(value)); + find('metaEditor').simulate('change'); }; return { diff --git a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/ingest_pipelines_create.test.tsx b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/ingest_pipelines_create.test.tsx index fe371138487e8..d17d5ab80e307 100644 --- a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/ingest_pipelines_create.test.tsx +++ b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/ingest_pipelines_create.test.tsx @@ -17,6 +17,23 @@ import { nestedProcessorsErrorFixture } from './fixtures'; const { setup } = pageHelpers.pipelinesCreate; +jest.mock('@kbn/kibana-react-plugin/public', () => { + const original = jest.requireActual('@kbn/kibana-react-plugin/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + ) => { + props.onChange(e.currentTarget.getAttribute('data-currentvalue')); + }} + /> + ), + }; +}); + jest.mock('@elastic/eui', () => { const original = jest.requireActual('@elastic/eui'); diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.helpers.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.helpers.tsx index ac39c4faed1a2..3d249afcbb17e 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.helpers.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.helpers.tsx @@ -32,8 +32,8 @@ jest.mock('@kbn/kibana-react-plugin/public', () => { { - props.onChange(e.jsonContent); + onChange={(e: React.ChangeEvent) => { + props.onChange(e.currentTarget.getAttribute('data-currentvalue')); }} /> ), @@ -127,10 +127,8 @@ const createActions = (testBed: TestBed) => { }, addDocumentsJson(jsonString: string) { - find('documentsEditor').simulate('change', { - jsonString, - }); - jest.advanceTimersByTime(0); // advance timers to allow the form to validate + find('documentsEditor').getDOMNode().setAttribute('data-currentvalue', jsonString); + find('documentsEditor').simulate('change'); }, clickDocumentsDropdown() { diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/modal_provider.test.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/modal_provider.test.tsx index 2cf8dc3ee1a25..9af5940e326d0 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/modal_provider.test.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/modal_provider.test.tsx @@ -7,8 +7,11 @@ import React from 'react'; import '@kbn/es-ui-shared-plugin/public/components/code_editor/jest_mock'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { ModalProvider, OnDoneLoadJsonHandler } from './modal_provider'; +import { uiSettingsServiceMock } from '@kbn/core/public/mocks'; + jest.mock('lodash', () => { const original = jest.requireActual('lodash'); @@ -18,20 +21,39 @@ jest.mock('lodash', () => { }; }); +jest.mock('@kbn/kibana-react-plugin/public', () => { + const original = jest.requireActual('@kbn/kibana-react-plugin/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + ) => { + props.onChange(e.currentTarget.getAttribute('data-currentvalue')); + }} + /> + ), + }; +}); + import { registerTestBed, TestBed } from '@kbn/test-jest-helpers'; const setup = ({ onDone }: { onDone: OnDoneLoadJsonHandler }) => { return registerTestBed( () => ( - - {(openModal) => { - return ( - - ); - }} - + + + {(openModal) => { + return ( + + ); + }} + + ), { memoryRouter: { @@ -78,7 +100,10 @@ describe('Load from JSON ModalProvider', () => { }, ], }); - find('mockCodeEditor').simulate('change', { jsonString: validPipeline }); + // Set the value of the mock code editor + find('mockCodeEditor').getDOMNode().setAttribute('data-currentvalue', validPipeline); + find('mockCodeEditor').simulate('change'); + find('confirmModalConfirmButton').simulate('click'); expect(!exists('loadJsonConfirmationModal')); expect(onDone).toHaveBeenCalledTimes(1); diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/modal_provider.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/modal_provider.tsx index 0147a5dcc7f7d..646436f628c92 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/modal_provider.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/modal_provider.tsx @@ -128,7 +128,7 @@ export const ModalProvider: FunctionComponent = ({ onDone, children }) => diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/test_pipeline/test_pipeline_tabs/tab_documents/tab_documents.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/test_pipeline/test_pipeline_tabs/tab_documents/tab_documents.tsx index 467299433b145..fc731f6be078d 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/test_pipeline/test_pipeline_tabs/tab_documents/tab_documents.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/test_pipeline/test_pipeline_tabs/tab_documents/tab_documents.tsx @@ -211,7 +211,7 @@ export const DocumentsTab: FunctionComponent = ({ = ({ path="_meta" component={JsonEditorField} componentProps={{ - euiCodeEditorProps: { + codeEditorProps: { 'data-test-subj': 'metaEditor', height: '200px', 'aria-label': i18n.translate('xpack.ingestPipelines.form.metaAriaLabel', { From f581972a84ce15cbf59e4726be3de7548b6404aa Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Mon, 24 Apr 2023 13:18:36 +0200 Subject: [PATCH 2/5] Migrate json editor to use new editor --- .../components/json_editor/json_editor.tsx | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/src/plugins/es_ui_shared/public/components/json_editor/json_editor.tsx b/src/plugins/es_ui_shared/public/components/json_editor/json_editor.tsx index 8e662a97b2790..df4c37a081973 100644 --- a/src/plugins/es_ui_shared/public/components/json_editor/json_editor.tsx +++ b/src/plugins/es_ui_shared/public/components/json_editor/json_editor.tsx @@ -9,8 +9,8 @@ import React, { useCallback, useMemo } from 'react'; import { EuiFormRow } from '@elastic/eui'; import { debounce } from 'lodash'; +import { CodeEditor } from '@kbn/kibana-react-plugin/public'; -import { EuiCodeEditor } from '../code_editor'; import { useJson, OnJsonEditorUpdateHandler } from './use_json'; interface Props { @@ -19,7 +19,7 @@ interface Props { helpText?: React.ReactNode; value?: string; defaultValue?: T; - euiCodeEditorProps?: { [key: string]: any }; + codeEditorProps?: { [key: string]: any }; error?: string | null; } @@ -29,7 +29,7 @@ function JsonEditorComp({ onUpdate, value, defaultValue, - euiCodeEditorProps, + codeEditorProps, error: propsError, }: Props) { const { @@ -83,23 +83,17 @@ function JsonEditorComp({ error={error} fullWidth > - ); From 89d6ac98891e600171d130f7daaf84064566b944 Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Mon, 24 Apr 2023 13:23:08 +0200 Subject: [PATCH 3/5] Update props --- .../components/load_mappings/load_mappings_provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/load_mappings/load_mappings_provider.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/load_mappings/load_mappings_provider.tsx index a4849f556972f..3748a94578d48 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/load_mappings/load_mappings_provider.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/load_mappings/load_mappings_provider.tsx @@ -242,7 +242,7 @@ export const LoadMappingsProvider = ({ onJson, esNodesPlugins, children }: Props label={i18nTexts.editor.label} onUpdate={onJsonUpdate} defaultValue={state.json?.unparsed} - euiCodeEditorProps={{ + codeEditorProps={{ height: '450px', }} /> From acb9b1a0cd30b021b5feb6bd7b3cf64e3ab8b3e0 Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Mon, 24 Apr 2023 13:33:24 +0200 Subject: [PATCH 4/5] commit using @elastic.co From bb2fd88470b5d119627be1c1a26c05519efd322b Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Tue, 25 Apr 2023 10:32:18 +0200 Subject: [PATCH 5/5] Fix tests --- .../component_template_create.test.tsx | 17 +++++++ .../component_template_edit.test.tsx | 17 +++++++ .../steps/step_logistics.tsx | 2 +- .../helpers/mappings_editor.helpers.tsx | 27 +++++++++-- .../helpers/setup_environment.tsx | 4 +- .../mappings_editor.test.tsx | 8 ++-- .../meta_field_section/meta_field_section.tsx | 2 +- .../field_parameters/meta_parameter.tsx | 2 +- .../load_mappings_provider.test.tsx | 46 +++++++++++++------ .../templates_form/templates_form.tsx | 2 +- .../template_form/steps/step_logistics.tsx | 2 +- 11 files changed, 102 insertions(+), 27 deletions(-) diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_create.test.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_create.test.tsx index 5e915c526dc44..ce1f84dfbd2d8 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_create.test.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_create.test.tsx @@ -32,6 +32,23 @@ jest.mock('@elastic/eui', () => { }; }); +jest.mock('@kbn/kibana-react-plugin/public', () => { + const original = jest.requireActual('@kbn/kibana-react-plugin/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + { + props.onChange(e.jsonContent); + }} + /> + ), + }; +}); + describe('', () => { let testBed: ComponentTemplateCreateTestBed; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_edit.test.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_edit.test.tsx index 94beecf441b07..1bed25fb131fd 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_edit.test.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_edit.test.tsx @@ -31,6 +31,23 @@ jest.mock('@elastic/eui', () => { }; }); +jest.mock('@kbn/kibana-react-plugin/public', () => { + const original = jest.requireActual('@kbn/kibana-react-plugin/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + { + props.onChange(e.jsonContent); + }} + /> + ), + }; +}); + describe('', () => { let testBed: ComponentTemplateEditTestBed; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_logistics.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_logistics.tsx index 597f96625082c..745f2839c5f69 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_logistics.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_form/steps/step_logistics.tsx @@ -209,7 +209,7 @@ export const StepLogistics: React.FunctionComponent = React.memo( path="_meta" component={JsonEditorField} componentProps={{ - euiCodeEditorProps: { + codeEditorProps: { ['data-test-subj']: 'metaEditor', height: '200px', 'aria-label': i18n.translate( diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/mappings_editor.helpers.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/mappings_editor.helpers.tsx index 126afdc909567..dd64ba8ea098e 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/mappings_editor.helpers.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/mappings_editor.helpers.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import React from 'react'; import { act } from 'react-dom/test-utils'; import { ReactWrapper } from 'enzyme'; import { registerTestBed, TestBed, findTestSubject } from '@kbn/test-jest-helpers'; @@ -23,6 +24,23 @@ export interface DomFields { }; } +jest.mock('@kbn/kibana-react-plugin/public', () => { + const original = jest.requireActual('@kbn/kibana-react-plugin/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + ) => { + props.onChange(e.currentTarget.getAttribute('data-currentvalue')); + }} + /> + ), + }; +}); + const createActions = (testBed: TestBed) => { const { find, exists, form, component } = testBed; @@ -206,7 +224,10 @@ const createActions = (testBed: TestBed) => { await act(async () => { form.setInputValue('runtimeFieldEditor.nameField.input', field.name); jest.advanceTimersByTime(0); // advance timers to allow the form to validate - form.setInputValue('runtimeFieldEditor.scriptField', field.script.source); + find('runtimeFieldEditor.scriptField') + .getDOMNode() + .setAttribute('data-currentvalue', field.script.source); + find('runtimeFieldEditor.scriptField').simulate('change'); jest.advanceTimersByTime(0); // advance timers to allow the form to validate find('typeField').simulate('change', [ { @@ -296,8 +317,8 @@ const createActions = (testBed: TestBed) => { }; const updateJsonEditor = (testSubject: TestSubjects, value: object) => { - find(testSubject).simulate('change', { jsonString: JSON.stringify(value) }); - jest.advanceTimersByTime(0); // advance timers to allow the form to validate + find(testSubject).getDOMNode().setAttribute('data-currentvalue', JSON.stringify(value)); + find(testSubject).simulate('change'); }; const getJsonEditorValue = (testSubject: TestSubjects) => { diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/setup_environment.tsx index 48918312be601..c2cefc3062237 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/setup_environment.tsx @@ -54,10 +54,10 @@ jest.mock('@kbn/kibana-react-plugin/public', () => { const CodeEditorMock = (props: any) => ( ) => { - props.onChange(e.target.value); + props.onChange(e.currentTarget.getAttribute('data-currentvalue')); }} /> ); diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/mappings_editor.test.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/mappings_editor.test.tsx index 2cd052c8bdd99..6a44963d91e66 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/mappings_editor.test.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/mappings_editor.test.tsx @@ -175,10 +175,10 @@ describe('Mappings editor: core', () => { // Update the dynamic templates editor value const updatedValueTemplates = [{ after: 'bar' }]; - await act(async () => { - updateJsonEditor('dynamicTemplatesEditor', updatedValueTemplates); - }); - component.update(); + // await act(async () => { + updateJsonEditor('dynamicTemplatesEditor', updatedValueTemplates); + // }); + // component.update(); templatesValue = getJsonEditorValue('dynamicTemplatesEditor'); expect(templatesValue).toEqual(updatedValueTemplates); diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/meta_field_section/meta_field_section.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/meta_field_section/meta_field_section.tsx index cc1a3859c1c69..d5d19cd696cda 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/meta_field_section/meta_field_section.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/meta_field_section/meta_field_section.tsx @@ -43,7 +43,7 @@ export const MetaFieldSection = () => ( path="metaField" component={JsonEditorField} componentProps={{ - euiCodeEditorProps: { + codeEditorProps: { height: '400px', 'aria-label': i18n.translate('xpack.idxMgmt.mappingsEditor.metaFieldEditorAriaLabel', { defaultMessage: '_meta field data editor', diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/meta_parameter.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/meta_parameter.tsx index 867bc22439d63..cdad7f839ac1c 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/meta_parameter.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/meta_parameter.tsx @@ -40,7 +40,7 @@ export const MetaParameter: FunctionComponent = ({ defaultToggleValue }) config={getFieldConfig('meta')} component={JsonEditorField} componentProps={{ - euiCodeEditorProps: { + codeEditorProps: { ['data-test-subj']: 'metaParameterEditor', height: '300px', 'aria-label': i18n.translate('xpack.idxMgmt.mappingsEditor.metaParameterAriaLabel', { diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/load_mappings/load_mappings_provider.test.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/load_mappings/load_mappings_provider.test.tsx index 2965fd1cec670..0594f379d96e1 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/load_mappings/load_mappings_provider.test.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/load_mappings/load_mappings_provider.test.tsx @@ -7,6 +7,8 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { uiSettingsServiceMock } from '@kbn/core/public/mocks'; import '@kbn/es-ui-shared-plugin/public/components/code_editor/jest_mock'; jest.mock('lodash', () => { @@ -18,17 +20,39 @@ jest.mock('lodash', () => { }; }); +jest.mock('@kbn/kibana-react-plugin/public', () => { + const original = jest.requireActual('@kbn/kibana-react-plugin/public'); + + const CodeEditorMock = (props: any) => ( + ) => { + props.onChange(e.currentTarget.getAttribute('data-currentvalue')); + }} + /> + ); + + return { + ...original, + CodeEditor: CodeEditorMock, + }; +}); + import { registerTestBed, TestBed } from '@kbn/test-jest-helpers'; import { LoadMappingsProvider } from './load_mappings_provider'; const ComponentToTest = ({ onJson }: { onJson: () => void }) => ( - - {(openModal) => ( - - )} - + + + {(openModal) => ( + + )} + + ); const setup = (props: any) => @@ -46,12 +70,8 @@ const openModalWithJsonContent = component.update(); - act(() => { - // Set the mappings to load - find('mockCodeEditor').simulate('change', { - jsonString: JSON.stringify(json), - }); - }); + find('mockCodeEditor').getDOMNode().setAttribute('data-currentvalue', JSON.stringify(json)); + find('mockCodeEditor').simulate('change'); }; describe('', () => { diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/templates_form/templates_form.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/templates_form/templates_form.tsx index 7177a9f92c084..9f68c02095a00 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/templates_form/templates_form.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/templates_form/templates_form.tsx @@ -118,7 +118,7 @@ export const TemplatesForm = React.memo(({ value }: Props) => { path="dynamicTemplates" component={JsonEditorField} componentProps={{ - euiCodeEditorProps: { + codeEditorProps: { ['data-test-subj']: 'dynamicTemplatesEditor', height: '600px', 'aria-label': i18n.translate( diff --git a/x-pack/plugins/index_management/public/application/components/template_form/steps/step_logistics.tsx b/x-pack/plugins/index_management/public/application/components/template_form/steps/step_logistics.tsx index ccc94736e0800..9bb0bf6831624 100644 --- a/x-pack/plugins/index_management/public/application/components/template_form/steps/step_logistics.tsx +++ b/x-pack/plugins/index_management/public/application/components/template_form/steps/step_logistics.tsx @@ -316,7 +316,7 @@ export const StepLogistics: React.FunctionComponent = React.memo( path="_meta" component={JsonEditorField} componentProps={{ - euiCodeEditorProps: { + codeEditorProps: { height: '280px', 'aria-label': i18n.translate( 'xpack.idxMgmt.templateForm.stepLogistics.metaFieldEditorAriaLabel',