diff --git a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/get_embeddable_factories_mock.ts b/src/legacy/core_plugins/kibana/public/dashboard/__tests__/get_embeddable_factories_mock.ts deleted file mode 100644 index 357ab307c3f12..0000000000000 --- a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/get_embeddable_factories_mock.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* global jest */ -export function getEmbeddableFactoryMock(config?: any) { - const embeddableFactoryMockDefaults = { - create: jest.fn(() => Promise.resolve({})), - }; - return Object.assign(embeddableFactoryMockDefaults, config); -} diff --git a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/__snapshots__/dashboard_empty_screen.test.tsx.snap b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/__snapshots__/dashboard_empty_screen.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/dashboard/__tests__/__snapshots__/dashboard_empty_screen.test.tsx.snap rename to src/legacy/core_plugins/kibana/public/dashboard/np_ready/__snapshots__/dashboard_empty_screen.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/dashboard_empty_screen.test.tsx b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_empty_screen.test.tsx similarity index 96% rename from src/legacy/core_plugins/kibana/public/dashboard/__tests__/dashboard_empty_screen.test.tsx rename to src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_empty_screen.test.tsx index 347502c2560ab..d5e22798b4f24 100644 --- a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/dashboard_empty_screen.test.tsx +++ b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_empty_screen.test.tsx @@ -18,10 +18,7 @@ */ import React from 'react'; import { mountWithIntl } from 'test_utils/enzyme_helpers'; -import { - DashboardEmptyScreen, - DashboardEmptyScreenProps, -} from '../np_ready/dashboard_empty_screen'; +import { DashboardEmptyScreen, DashboardEmptyScreenProps } from './dashboard_empty_screen'; // @ts-ignore import { findTestSubject } from '@elastic/eui/lib/test'; import { coreMock } from '../../../../../../core/public/mocks'; diff --git a/src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_state.test.ts b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_state.test.ts index 152cd84b7c38d..60ea14dad19e1 100644 --- a/src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_state.test.ts +++ b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_state.test.ts @@ -20,7 +20,7 @@ import './np_core.test.mocks'; import { createBrowserHistory } from 'history'; import { DashboardStateManager } from './dashboard_state_manager'; -import { getSavedDashboardMock } from '../__tests__'; +import { getSavedDashboardMock } from './test_utils'; import { InputTimeRange, TimefilterContract, TimeRange } from 'src/plugins/data/public'; import { ViewMode } from 'src/plugins/embeddable/public'; import { createKbnUrlStateStorage } from 'src/plugins/kibana_utils/public'; diff --git a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/get_saved_dashboard_mock.ts b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/test_utils/get_saved_dashboard_mock.ts similarity index 85% rename from src/legacy/core_plugins/kibana/public/dashboard/__tests__/get_saved_dashboard_mock.ts rename to src/legacy/core_plugins/kibana/public/dashboard/np_ready/test_utils/get_saved_dashboard_mock.ts index baf5bad510ce1..d5e61936f67cf 100644 --- a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/get_saved_dashboard_mock.ts +++ b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/test_utils/get_saved_dashboard_mock.ts @@ -17,9 +17,8 @@ * under the License. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { searchSourceMock } from '../../../../../../plugins/data/public/search/search_source/mocks'; -import { SavedObjectDashboard } from '../saved_dashboard/saved_dashboard'; +import { searchSourceMock } from '../../../../../../../plugins/data/public/search/search_source/mocks'; +import { SavedObjectDashboard } from '../../saved_dashboard/saved_dashboard'; export function getSavedDashboardMock( config?: Partial diff --git a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/index.ts b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/test_utils/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/public/dashboard/__tests__/index.ts rename to src/legacy/core_plugins/kibana/public/dashboard/np_ready/test_utils/index.ts index 2b992f95695f3..a9a306da7f1a2 100644 --- a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/index.ts +++ b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/test_utils/index.ts @@ -18,4 +18,3 @@ */ export { getSavedDashboardMock } from './get_saved_dashboard_mock'; -export { getEmbeddableFactoryMock } from './get_embeddable_factories_mock'; diff --git a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/url_helper.test.ts b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/url_helper.test.ts similarity index 99% rename from src/legacy/core_plugins/kibana/public/dashboard/__tests__/url_helper.test.ts rename to src/legacy/core_plugins/kibana/public/dashboard/np_ready/url_helper.test.ts index df2dbfd54c130..60ca1b39d29d6 100644 --- a/src/legacy/core_plugins/kibana/public/dashboard/__tests__/url_helper.test.ts +++ b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/url_helper.test.ts @@ -47,7 +47,7 @@ import { addEmbeddableToDashboardUrl, getLensUrlFromDashboardAbsoluteUrl, getUrlVars, -} from '../np_ready/url_helper'; +} from './url_helper'; describe('Dashboard URL Helper', () => { beforeEach(() => {