Skip to content

Commit 1f485b6

Browse files
cleanup
1 parent 27ff24f commit 1f485b6

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/component_template_list.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import { ComponentTemplateListItem } from '../../shared_imports';
1010

1111
import { setupEnvironment, pageHelpers } from './helpers';
1212
import { ComponentTemplateListTestBed } from './helpers/component_template_list.helpers';
13-
14-
const API_BASE_PATH = '/api/index_management';
13+
import { API_BASE_PATH } from './helpers/constants';
1514

1615
const { setup } = pageHelpers.componentTemplateList;
1716

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
export const API_BASE_PATH = '/api/index_management';

x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/http_requests.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
import sinon, { SinonFakeServer } from 'sinon';
88
import { ComponentTemplateListItem, ComponentTemplateDeserialized } from '../../../shared_imports';
9-
10-
const API_BASE_PATH = '/api/index_management';
9+
import { API_BASE_PATH } from './constants';
1110

1211
// Register helpers to mock HTTP Requests
1312
const registerHttpRequestMockHelpers = (server: SinonFakeServer) => {

x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ import axios from 'axios';
99
import axiosXhrAdapter from 'axios/lib/adapters/xhr';
1010

1111
import { HttpSetup } from 'kibana/public';
12-
import { API_BASE_PATH } from '../../../../../../../common/constants';
1312
import {
1413
notificationServiceMock,
1514
docLinksServiceMock,
1615
} from '../../../../../../../../../../src/core/public/mocks';
1716

18-
import { init as initHttpRequests } from './http_requests';
1917
import { ComponentTemplatesProvider } from '../../../component_templates_context';
2018

19+
import { init as initHttpRequests } from './http_requests';
20+
import { API_BASE_PATH } from './constants';
21+
2122
const mockHttpClient = axios.create({ adapter: axiosXhrAdapter });
2223

2324
const appDependencies = {

0 commit comments

Comments
 (0)