Skip to content

Commit e72123a

Browse files
committed
Move tests in dashboard into appropriate folders
1 parent 9567cca commit e72123a

10 files changed

Lines changed: 7 additions & 72 deletions

File tree

src/legacy/core_plugins/kibana/public/dashboard/__tests__/get_embeddable_factories_mock.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/legacy/core_plugins/kibana/public/dashboard/__tests__/saved_dashboards.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/legacy/core_plugins/kibana/public/dashboard/legacy_imports.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ export { SavedObjectLoader } from 'ui/saved_objects';
6868
export { VISUALIZE_EMBEDDABLE_TYPE } from '../../../visualizations/public/embeddable';
6969
export { registerTimefilterWithGlobalStateFactory } from 'ui/timefilter/setup_router';
7070
export { absoluteToParsedUrl } from 'ui/url/absolute_to_parsed_url';
71+
export { searchSourceMock } from 'ui/courier/search_source/mocks';

src/legacy/core_plugins/kibana/public/dashboard/__tests__/__snapshots__/dashboard_empty_screen.test.tsx.snap renamed to src/legacy/core_plugins/kibana/public/dashboard/np_ready/__snapshots__/dashboard_empty_screen.test.tsx.snap

File renamed without changes.

src/legacy/core_plugins/kibana/public/dashboard/__tests__/dashboard_empty_screen.test.tsx renamed to src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_empty_screen.test.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
*/
1919
import React from 'react';
2020
import { mountWithIntl } from 'test_utils/enzyme_helpers';
21-
import {
22-
DashboardEmptyScreen,
23-
DashboardEmptyScreenProps,
24-
} from '../np_ready/dashboard_empty_screen';
21+
import { DashboardEmptyScreen, DashboardEmptyScreenProps } from './dashboard_empty_screen';
2522
// @ts-ignore
2623
import { findTestSubject } from '@elastic/eui/lib/test';
2724
import { coreMock } from '../../../../../../core/public/mocks';

src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_state.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import './np_core.test.mocks';
2121
import { DashboardStateManager } from './dashboard_state_manager';
22-
import { getAppStateMock, getSavedDashboardMock } from '../__tests__';
22+
import { getAppStateMock, getSavedDashboardMock } from './test_utils';
2323
import { AppStateClass } from '../legacy_imports';
2424
import { DashboardAppState } from './types';
2525
import { TimeRange, TimefilterContract, InputTimeRange } from 'src/plugins/data/public';

src/legacy/core_plugins/kibana/public/dashboard/__tests__/get_app_state_mock.ts renamed to src/legacy/core_plugins/kibana/public/dashboard/np_ready/test_utils/get_app_state_mock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { AppStateClass } from '../legacy_imports';
20+
import { AppStateClass } from '../../legacy_imports';
2121

2222
/**
2323
* A poor excuse for a mock just to get some basic tests to run in jest without requiring the injector.

src/legacy/core_plugins/kibana/public/dashboard/__tests__/get_saved_dashboard_mock.ts renamed to src/legacy/core_plugins/kibana/public/dashboard/np_ready/test_utils/get_saved_dashboard_mock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* under the License.
1818
*/
1919

20-
import { searchSourceMock } from 'ui/courier/search_source/mocks';
21-
import { SavedObjectDashboard } from '../saved_dashboard/saved_dashboard';
20+
import { searchSourceMock } from '../../legacy_imports';
21+
import { SavedObjectDashboard } from '../../saved_dashboard/saved_dashboard';
2222

2323
export function getSavedDashboardMock(
2424
config?: Partial<SavedObjectDashboard>

src/legacy/core_plugins/kibana/public/dashboard/__tests__/index.ts renamed to src/legacy/core_plugins/kibana/public/dashboard/np_ready/test_utils/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@
1919

2020
export { getAppStateMock } from './get_app_state_mock';
2121
export { getSavedDashboardMock } from './get_saved_dashboard_mock';
22-
export { getEmbeddableFactoryMock } from './get_embeddable_factories_mock';

src/legacy/core_plugins/kibana/public/dashboard/__tests__/url_helper.test.ts renamed to src/legacy/core_plugins/kibana/public/dashboard/np_ready/url_helper.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import {
4747
addEmbeddableToDashboardUrl,
4848
getLensUrlFromDashboardAbsoluteUrl,
4949
getUrlVars,
50-
} from '../np_ready/url_helper';
50+
} from './url_helper';
5151

5252
describe('Dashboard URL Helper', () => {
5353
beforeEach(() => {

0 commit comments

Comments
 (0)