parent
0cec744242
commit
186fdf9733
|
@ -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) => {
|
|
@ -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 = {
|
|
@ -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 = {
|
|
@ -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 = {
|
|
@ -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 });
|
||||
|
|
@ -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';
|
||||
|
|
@ -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';
|
||||
|
|
@ -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"
|
||||
|
|
|
@ -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) {
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import sinon, { SinonFakeServer } from 'sinon';
|
||||
import { ROUTES } from '../../common/constants';
|
||||
import { ROUTES } from '../../../common/constants';
|
||||
|
||||
const { API_ROOT } = ROUTES;
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { getWatch } from '../../__fixtures__';
|
||||
import { getWatch } from '../../../__fixtures__';
|
||||
|
||||
export const WATCH_ID = 'my-test-watch';
|
||||
|
|
@ -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(
|
|
@ -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: {
|
|
@ -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 = {
|
|
@ -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';
|
||||
|
|
@ -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 = {
|
|
@ -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';
|
||||
|
|
@ -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';
|
|
@ -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,
|
|
@ -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,
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
"declarationMap": true
|
||||
},
|
||||
"include": [
|
||||
"__jest__/**/*",
|
||||
"server/**/*",
|
||||
"public/**/*",
|
||||
"common/**/*",
|
||||
"tests_client_integration/**/*",
|
||||
"__fixtures__/*",
|
||||
"../../../typings/**/*"
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue