diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx index 76b8295b6b1f4..5a97dadc870cb 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx @@ -836,7 +836,6 @@ describe('', () => { testBed.actions.mappings.isReferenceFieldVisible(); testBed.actions.mappings.selectInferenceIdButtonExists(); testBed.actions.mappings.openSelectInferencePopover(); - testBed.actions.mappings.expectDefaultInferenceModelToExists(); testBed.actions.mappings.expectCustomInferenceModelToExists( `custom-inference_${customInferenceModel}` ); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx index ed5af67840513..41fcb2f03dc33 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx @@ -71,6 +71,8 @@ jest.mock('../../../public/application/components/mappings_editor/mappings_state jest.mock('../../../public/application/services/api', () => ({ useLoadInferenceEndpoints: jest.fn().mockReturnValue({ data: [ + { inference_id: '.elser-2-elasticsearch', task_type: 'sparse_embedding' }, + { inference_id: '.multilingual-e5-small-elasticsearch', task_type: 'text_embedding' }, { inference_id: 'endpoint-1', task_type: 'text_embedding' }, { inference_id: 'endpoint-2', task_type: 'sparse_embedding' }, { inference_id: 'endpoint-3', task_type: 'completion' }, @@ -83,7 +85,7 @@ jest.mock('../../../public/application/services/api', () => ({ function getTestForm(Component: React.FC) { return (defaultProps: SelectInferenceIdProps) => { const { form } = useForm(); - form.setFieldValue('inference_id', 'elser_model_2'); + form.setFieldValue('inference_id', '.elser-2-elasticsearch'); return (
@@ -125,8 +127,10 @@ describe('SelectInferenceId', () => { it('should display the inference endpoints in the combo', () => { find('inferenceIdButton').simulate('click'); - expect(find('data-inference-endpoint-list').contains('e5')).toBe(true); - expect(find('data-inference-endpoint-list').contains('elser_model_2')).toBe(true); + expect(find('data-inference-endpoint-list').contains('.elser-2-elasticsearch')).toBe(true); + expect( + find('data-inference-endpoint-list').contains('.multilingual-e5-small-elasticsearch') + ).toBe(true); expect(find('data-inference-endpoint-list').contains('endpoint-1')).toBe(true); expect(find('data-inference-endpoint-list').contains('endpoint-2')).toBe(true); expect(find('data-inference-endpoint-list').contains('endpoint-3')).toBe(false);