diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/http_requests.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/http_requests.ts similarity index 92% rename from x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/http_requests.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/http_requests.ts index 9abd981bd85c8..e3f6df54db60e 100644 --- a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/http_requests.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/http_requests.ts @@ -6,9 +6,9 @@ */ import sinon, { SinonFakeServer } from 'sinon'; -import { API_BASE_PATH } from '../../common/constants'; -import { UpgradeAssistantStatus } from '../../common/types'; -import { ResponseError } from '../../public/application/lib/api'; +import { API_BASE_PATH } from '../../../common/constants'; +import { UpgradeAssistantStatus } from '../../../common/types'; +import { ResponseError } from '../../../public/application/lib/api'; // Register helpers to mock HTTP Requests const registerHttpRequestMockHelpers = (server: SinonFakeServer) => { diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/index.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts similarity index 100% rename from x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/index.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/indices.helpers.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/indices.helpers.ts similarity index 95% rename from x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/indices.helpers.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/indices.helpers.ts index a59aa009a912b..5189ddc420b08 100644 --- a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/indices.helpers.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/indices.helpers.ts @@ -6,7 +6,7 @@ */ import { registerTestBed, TestBed, TestBedConfig } from '@kbn/test/jest'; -import { EsDeprecationsContent } from '../../public/application/components/es_deprecations'; +import { EsDeprecationsContent } from '../../../public/application/components/es_deprecations'; import { WithAppDependencies } from './setup_environment'; const testBedConfig: TestBedConfig = { diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/kibana.helpers.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/kibana.helpers.ts similarity index 93% rename from x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/kibana.helpers.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/kibana.helpers.ts index 0a800771e2656..370679d7d1a71 100644 --- a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/kibana.helpers.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/kibana.helpers.ts @@ -6,7 +6,7 @@ */ import { registerTestBed, TestBed, TestBedConfig } from '@kbn/test/jest'; -import { KibanaDeprecationsContent } from '../../public/application/components/kibana_deprecations'; +import { KibanaDeprecationsContent } from '../../../public/application/components/kibana_deprecations'; import { WithAppDependencies } from './setup_environment'; const testBedConfig: TestBedConfig = { diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/overview.helpers.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/overview.helpers.ts similarity index 95% rename from x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/overview.helpers.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/overview.helpers.ts index 9e4b2eae483ea..5c89b6230d85f 100644 --- a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/overview.helpers.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/overview.helpers.ts @@ -7,7 +7,7 @@ import { act } from 'react-dom/test-utils'; import { registerTestBed, TestBed, TestBedConfig } from '@kbn/test/jest'; -import { DeprecationsOverview } from '../../public/application/components/overview'; +import { DeprecationsOverview } from '../../../public/application/components/overview'; import { WithAppDependencies } from './setup_environment'; const testBedConfig: TestBedConfig = { diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/setup_environment.tsx b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/setup_environment.tsx similarity index 84% rename from x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/setup_environment.tsx rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/setup_environment.tsx index 9ea5c15e9d031..31189428fda18 100644 --- a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/setup_environment.tsx @@ -14,14 +14,14 @@ import { deprecationsServiceMock, docLinksServiceMock, notificationServiceMock, -} from '../../../../../src/core/public/mocks'; -import { HttpSetup } from '../../../../../src/core/public'; +} from 'src/core/public/mocks'; +import { HttpSetup } from 'src/core/public'; -import { mockKibanaSemverVersion, UA_READONLY_MODE } from '../../common/constants'; -import { AppContextProvider } from '../../public/application/app_context'; +import { mockKibanaSemverVersion, UA_READONLY_MODE } from '../../../common/constants'; +import { AppContextProvider } from '../../../public/application/app_context'; +import { apiService } from '../../../public/application/lib/api'; +import { breadcrumbService } from '../../../public/application/lib/breadcrumbs'; import { init as initHttpRequests } from './http_requests'; -import { apiService } from '../../public/application/lib/api'; -import { breadcrumbService } from '../../public/application/lib/breadcrumbs'; const mockHttpClient = axios.create({ adapter: axiosXhrAdapter }); diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/indices.test.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/indices.test.ts similarity index 98% rename from x-pack/plugins/upgrade_assistant/tests_client_integration/indices.test.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/indices.test.ts index 51526698effc5..059980cb5671b 100644 --- a/x-pack/plugins/upgrade_assistant/tests_client_integration/indices.test.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/indices.test.ts @@ -6,8 +6,8 @@ */ import { act } from 'react-dom/test-utils'; -import { indexSettingDeprecations } from '../common/constants'; -import { MIGRATION_DEPRECATION_LEVEL } from '../common/types'; +import { indexSettingDeprecations } from '../../common/constants'; +import { MIGRATION_DEPRECATION_LEVEL } from '../../common/types'; import { IndicesTestBed, setupIndicesPage, setupEnvironment } from './helpers'; diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/kibana.test.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana.test.ts similarity index 100% rename from x-pack/plugins/upgrade_assistant/tests_client_integration/kibana.test.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana.test.ts diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/overview.test.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview.test.ts similarity index 99% rename from x-pack/plugins/upgrade_assistant/tests_client_integration/overview.test.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview.test.ts index fd7cd2c90e952..f3f76c3a6688e 100644 --- a/x-pack/plugins/upgrade_assistant/tests_client_integration/overview.test.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview.test.ts @@ -8,7 +8,7 @@ import type { DomainDeprecationDetails } from 'kibana/public'; import { act } from 'react-dom/test-utils'; import { deprecationsServiceMock } from 'src/core/public/mocks'; -import { UpgradeAssistantStatus } from '../common/types'; +import { UpgradeAssistantStatus } from '../../common/types'; import { OverviewTestBed, setupOverviewPage, setupEnvironment } from './helpers'; diff --git a/x-pack/plugins/upgrade_assistant/tsconfig.json b/x-pack/plugins/upgrade_assistant/tsconfig.json index 0d65c8ddd8fed..6303b06c0d899 100644 --- a/x-pack/plugins/upgrade_assistant/tsconfig.json +++ b/x-pack/plugins/upgrade_assistant/tsconfig.json @@ -8,10 +8,10 @@ "declarationMap": true }, "include": [ + "__jest__/**/*", "common/**/*", "public/**/*", "server/**/*", - "tests_client_integration/**/*", // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 "public/**/*.json", "server/**/*.json" diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/app_context.mock.tsx b/x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx similarity index 89% rename from x-pack/plugins/watcher/tests_client_integration/helpers/app_context.mock.tsx rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx index 2c85c357d709f..01c7155832745 100644 --- a/x-pack/plugins/watcher/tests_client_integration/helpers/app_context.mock.tsx +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx @@ -15,9 +15,9 @@ import { notificationServiceMock, httpServiceMock, scopedHistoryMock, -} from '../../../../../src/core/public/mocks'; -import { AppContextProvider } from '../../public/application/app_context'; -import { LicenseStatus } from '../../common/types/license_status'; +} from '../../../../../../src/core/public/mocks'; +import { AppContextProvider } from '../../../public/application/app_context'; +import { LicenseStatus } from '../../../common/types/license_status'; class MockTimeBuckets { setBounds(_domain: any) { diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/body_response.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/body_response.ts similarity index 100% rename from x-pack/plugins/watcher/tests_client_integration/helpers/body_response.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/body_response.ts diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/http_requests.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/http_requests.ts similarity index 99% rename from x-pack/plugins/watcher/tests_client_integration/helpers/http_requests.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/http_requests.ts index 20af3b25ead8a..e98cd66a25684 100644 --- a/x-pack/plugins/watcher/tests_client_integration/helpers/http_requests.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/http_requests.ts @@ -6,7 +6,7 @@ */ import sinon, { SinonFakeServer } from 'sinon'; -import { ROUTES } from '../../common/constants'; +import { ROUTES } from '../../../common/constants'; const { API_ROOT } = ROUTES; diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/index.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts similarity index 100% rename from x-pack/plugins/watcher/tests_client_integration/helpers/index.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/jest_constants.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/jest_constants.ts similarity index 87% rename from x-pack/plugins/watcher/tests_client_integration/helpers/jest_constants.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/jest_constants.ts index 5626d067aad2c..c59fa21a3ffae 100644 --- a/x-pack/plugins/watcher/tests_client_integration/helpers/jest_constants.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/jest_constants.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { getWatch } from '../../__fixtures__'; +import { getWatch } from '../../../__fixtures__'; export const WATCH_ID = 'my-test-watch'; diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/setup_environment.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts similarity index 91% rename from x-pack/plugins/watcher/tests_client_integration/helpers/setup_environment.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts index 6cd4ca3bcd2dd..05b325ee946bd 100644 --- a/x-pack/plugins/watcher/tests_client_integration/helpers/setup_environment.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts @@ -8,7 +8,7 @@ import axios from 'axios'; import axiosXhrAdapter from 'axios/lib/adapters/xhr'; import { init as initHttpRequests } from './http_requests'; -import { setHttpClient, setSavedObjectsClient } from '../../public/application/lib/api'; +import { setHttpClient, setSavedObjectsClient } from '../../../public/application/lib/api'; const mockHttpClient = axios.create({ adapter: axiosXhrAdapter }); mockHttpClient.interceptors.response.use( diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_create_json.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts similarity index 89% rename from x-pack/plugins/watcher/tests_client_integration/helpers/watch_create_json.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts index eb7b2bbfd6146..696a266ca4a3e 100644 --- a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_create_json.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts @@ -6,10 +6,10 @@ */ import { registerTestBed, TestBed, TestBedConfig } from '@kbn/test/jest'; +import { WatchEdit } from '../../../public/application/sections/watch_edit/components/watch_edit'; +import { registerRouter } from '../../../public/application/lib/navigation'; +import { ROUTES, WATCH_TYPES } from '../../../common/constants'; import { withAppContext } from './app_context.mock'; -import { WatchEdit } from '../../public/application/sections/watch_edit/components/watch_edit'; -import { registerRouter } from '../../public/application/lib/navigation'; -import { ROUTES, WATCH_TYPES } from '../../common/constants'; const testBedConfig: TestBedConfig = { memoryRouter: { diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_create_threshold.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts similarity index 92% rename from x-pack/plugins/watcher/tests_client_integration/helpers/watch_create_threshold.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts index 8bc147b1bc16c..c70684b80a6d5 100644 --- a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_create_threshold.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts @@ -6,9 +6,9 @@ */ import { registerTestBed, TestBed, TestBedConfig } from '@kbn/test/jest'; -import { WatchEdit } from '../../public/application/sections/watch_edit/components/watch_edit'; -import { registerRouter } from '../../public/application/lib/navigation'; -import { ROUTES, WATCH_TYPES } from '../../common/constants'; +import { WatchEdit } from '../../../public/application/sections/watch_edit/components/watch_edit'; +import { registerRouter } from '../../../public/application/lib/navigation'; +import { ROUTES, WATCH_TYPES } from '../../../common/constants'; import { withAppContext } from './app_context.mock'; const testBedConfig: TestBedConfig = { diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_edit.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts similarity index 86% rename from x-pack/plugins/watcher/tests_client_integration/helpers/watch_edit.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts index b9ca328618257..957755c9e5361 100644 --- a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_edit.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts @@ -6,9 +6,9 @@ */ import { registerTestBed, TestBed, TestBedConfig } from '@kbn/test/jest'; -import { WatchEdit } from '../../public/application/sections/watch_edit/components/watch_edit'; -import { registerRouter } from '../../public/application/lib/navigation'; -import { ROUTES } from '../../common/constants'; +import { WatchEdit } from '../../../public/application/sections/watch_edit/components/watch_edit'; +import { registerRouter } from '../../../public/application/lib/navigation'; +import { ROUTES } from '../../../common/constants'; import { WATCH_ID } from './jest_constants'; import { withAppContext } from './app_context.mock'; diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_list.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts similarity index 95% rename from x-pack/plugins/watcher/tests_client_integration/helpers/watch_list.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts index 246da308bedfd..ad171f9e40cad 100644 --- a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_list.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts @@ -8,8 +8,8 @@ import { act } from 'react-dom/test-utils'; import { registerTestBed, findTestSubject, TestBed, TestBedConfig, nextTick } from '@kbn/test/jest'; -import { WatchList } from '../../public/application/sections/watch_list/components/watch_list'; -import { ROUTES, REFRESH_INTERVALS } from '../../common/constants'; +import { WatchList } from '../../../public/application/sections/watch_list/components/watch_list'; +import { ROUTES, REFRESH_INTERVALS } from '../../../common/constants'; import { withAppContext } from './app_context.mock'; const testBedConfig: TestBedConfig = { diff --git a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_status.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts similarity index 96% rename from x-pack/plugins/watcher/tests_client_integration/helpers/watch_status.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts index c817f4b13de14..a1c7e8b404997 100644 --- a/x-pack/plugins/watcher/tests_client_integration/helpers/watch_status.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts @@ -8,8 +8,8 @@ import { act } from 'react-dom/test-utils'; import { registerTestBed, findTestSubject, TestBed, TestBedConfig, delay } from '@kbn/test/jest'; -import { WatchStatus } from '../../public/application/sections/watch_status/components/watch_status'; -import { ROUTES } from '../../common/constants'; +import { WatchStatus } from '../../../public/application/sections/watch_status/components/watch_status'; +import { ROUTES } from '../../../common/constants'; import { WATCH_ID } from './jest_constants'; import { withAppContext } from './app_context.mock'; diff --git a/x-pack/plugins/watcher/tests_client_integration/watch_create_json.test.ts b/x-pack/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts similarity index 98% rename from x-pack/plugins/watcher/tests_client_integration/watch_create_json.test.ts rename to x-pack/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts index e775a9d661acf..4a632d9752cac 100644 --- a/x-pack/plugins/watcher/tests_client_integration/watch_create_json.test.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts @@ -7,8 +7,8 @@ import { act } from 'react-dom/test-utils'; -import { getExecuteDetails } from '../__fixtures__'; -import { defaultWatch } from '../public/application/models/watch'; +import { getExecuteDetails } from '../../__fixtures__'; +import { defaultWatch } from '../../public/application/models/watch'; import { setupEnvironment, pageHelpers, nextTick, wrapBodyResponse } from './helpers'; import { WatchCreateJsonTestBed } from './helpers/watch_create_json.helpers'; import { WATCH } from './helpers/jest_constants'; diff --git a/x-pack/plugins/watcher/tests_client_integration/watch_create_threshold.test.tsx b/x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx similarity index 99% rename from x-pack/plugins/watcher/tests_client_integration/watch_create_threshold.test.tsx rename to x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx index 123e8bc9cff1c..2909243110303 100644 --- a/x-pack/plugins/watcher/tests_client_integration/watch_create_threshold.test.tsx +++ b/x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx @@ -9,6 +9,8 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import axiosXhrAdapter from 'axios/lib/adapters/xhr'; import axios from 'axios'; +import { getExecuteDetails } from '../../__fixtures__'; +import { WATCH_TYPES } from '../../common/constants'; import { setupEnvironment, pageHelpers, @@ -17,8 +19,6 @@ import { unwrapBodyResponse, } from './helpers'; import { WatchCreateThresholdTestBed } from './helpers/watch_create_threshold.helpers'; -import { getExecuteDetails } from '../__fixtures__'; -import { WATCH_TYPES } from '../common/constants'; const WATCH_NAME = 'my_test_watch'; @@ -50,8 +50,8 @@ const WATCH_VISUALIZE_DATA = { const mockHttpClient = axios.create({ adapter: axiosXhrAdapter }); -jest.mock('../public/application/lib/api', () => { - const original = jest.requireActual('../public/application/lib/api'); +jest.mock('../../public/application/lib/api', () => { + const original = jest.requireActual('../../public/application/lib/api'); return { ...original, diff --git a/x-pack/plugins/watcher/tests_client_integration/watch_edit.test.ts b/x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts similarity index 96% rename from x-pack/plugins/watcher/tests_client_integration/watch_edit.test.ts rename to x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts index aae6b96e325a7..b40388376d8d5 100644 --- a/x-pack/plugins/watcher/tests_client_integration/watch_edit.test.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts @@ -10,16 +10,16 @@ import axiosXhrAdapter from 'axios/lib/adapters/xhr'; import axios from 'axios'; import { getRandomString } from '@kbn/test/jest'; -import { getWatch } from '../__fixtures__'; -import { defaultWatch } from '../public/application/models/watch'; +import { getWatch } from '../../__fixtures__'; +import { defaultWatch } from '../../public/application/models/watch'; import { setupEnvironment, pageHelpers, nextTick, wrapBodyResponse } from './helpers'; import { WatchEditTestBed } from './helpers/watch_edit.helpers'; import { WATCH } from './helpers/jest_constants'; const mockHttpClient = axios.create({ adapter: axiosXhrAdapter }); -jest.mock('../public/application/lib/api', () => { - const original = jest.requireActual('../public/application/lib/api'); +jest.mock('../../public/application/lib/api', () => { + const original = jest.requireActual('../../public/application/lib/api'); return { ...original, diff --git a/x-pack/plugins/watcher/tests_client_integration/watch_list.test.ts b/x-pack/plugins/watcher/__jest__/client_integration/watch_list.test.ts similarity index 98% rename from x-pack/plugins/watcher/tests_client_integration/watch_list.test.ts rename to x-pack/plugins/watcher/__jest__/client_integration/watch_list.test.ts index 9fc2f6946b8e0..1a396a007dd0c 100644 --- a/x-pack/plugins/watcher/tests_client_integration/watch_list.test.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/watch_list.test.ts @@ -6,10 +6,10 @@ */ import { act } from 'react-dom/test-utils'; -import * as fixtures from '../__fixtures__'; +import * as fixtures from '../../__fixtures__'; +import { ROUTES } from '../../common/constants'; import { setupEnvironment, pageHelpers, getRandomString, findTestSubject } from './helpers'; import { WatchListTestBed } from './helpers/watch_list.helpers'; -import { ROUTES } from '../common/constants'; const { API_ROOT } = ROUTES; diff --git a/x-pack/plugins/watcher/tests_client_integration/watch_status.test.ts b/x-pack/plugins/watcher/__jest__/client_integration/watch_status.test.ts similarity index 98% rename from x-pack/plugins/watcher/tests_client_integration/watch_status.test.ts rename to x-pack/plugins/watcher/__jest__/client_integration/watch_status.test.ts index 69b081e1f1218..c19ec62b94477 100644 --- a/x-pack/plugins/watcher/tests_client_integration/watch_status.test.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/watch_status.test.ts @@ -6,13 +6,12 @@ */ import { act } from 'react-dom/test-utils'; +import moment from 'moment'; +import { getWatchHistory } from '../../__fixtures__'; +import { ROUTES, WATCH_STATES, ACTION_STATES } from '../../common/constants'; import { setupEnvironment, pageHelpers, nextTick } from './helpers'; import { WatchStatusTestBed } from './helpers/watch_status.helpers'; import { WATCH } from './helpers/jest_constants'; -import { getWatchHistory } from '../__fixtures__'; -import moment from 'moment'; -import { ROUTES } from '../common/constants'; -import { WATCH_STATES, ACTION_STATES } from '../common/constants'; const { API_ROOT } = ROUTES; diff --git a/x-pack/plugins/watcher/tsconfig.json b/x-pack/plugins/watcher/tsconfig.json index 9f5c0db779f94..15a28d498f2bd 100644 --- a/x-pack/plugins/watcher/tsconfig.json +++ b/x-pack/plugins/watcher/tsconfig.json @@ -8,10 +8,10 @@ "declarationMap": true }, "include": [ + "__jest__/**/*", "server/**/*", "public/**/*", "common/**/*", - "tests_client_integration/**/*", "__fixtures__/*", "../../../typings/**/*" ],