Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Jul 7, 2020
1 parent 1f710f4 commit 6a2cfcc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useAddToTimeline } from '../../hooks/use_add_to_timeline';
import { DraggableWrapperHoverContent } from './draggable_wrapper_hover_content';
import {
ManageGlobalTimeline,
timelineDefaults,
getTimelineDefaults,
} from '../../../timelines/components/manage_timeline';
import { TimelineId } from '../../../../common/types/timeline';

Expand Down Expand Up @@ -152,10 +152,7 @@ describe('DraggableWrapperHoverContent', () => {
beforeEach(() => {
onFilterAdded = jest.fn();
const manageTimelineForTesting = {
[timelineId]: {
...timelineDefaults,
id: timelineId,
},
[timelineId]: getTimelineDefaults(timelineId),
};

wrapper = mount(
Expand Down Expand Up @@ -249,8 +246,7 @@ describe('DraggableWrapperHoverContent', () => {

const manageTimelineForTesting = {
[timelineId]: {
...timelineDefaults,
id: timelineId,
...getTimelineDefaults(timelineId),
filterManager,
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Props } from './top_n';
import { StatefulTopN } from '.';
import {
ManageGlobalTimeline,
timelineDefaults,
getTimelineDefaults,
} from '../../../timelines/components/manage_timeline';
import { TimelineId } from '../../../../common/types/timeline';

Expand Down Expand Up @@ -272,8 +272,7 @@ describe('StatefulTopN', () => {
filterManager = new FilterManager(mockUiSettingsForFilterManager);
const manageTimelineForTesting = {
[TimelineId.active]: {
...timelineDefaults,
id: TimelineId.active,
...getTimelineDefaults(TimelineId.active),
filterManager,
},
};
Expand Down Expand Up @@ -351,8 +350,7 @@ describe('StatefulTopN', () => {

const manageTimelineForTesting = {
[TimelineId.active]: {
...timelineDefaults,
id: TimelineId.active,
...getTimelineDefaults(TimelineId.active),
filterManager,
documentType: 'alerts',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useMountAppended } from '../../../../common/utils/use_mount_appended';
import { DataProviders } from '.';
import { DataProvider } from './data_provider';
import { mockDataProviders } from './mock/mock_data_providers';
import { ManageGlobalTimeline, timelineDefaults } from '../../manage_timeline';
import { ManageGlobalTimeline, getTimelineDefaults } from '../../manage_timeline';
import { FilterManager } from '../../../../../../../../src/plugins/data/public/query/filter_manager';
import { createKibanaCoreStartMock } from '../../../../common/mock/kibana_core';
const mockUiSettingsForFilterManager = createKibanaCoreStartMock().uiSettings;
Expand All @@ -28,8 +28,7 @@ describe('DataProviders', () => {
test('renders correctly against snapshot', () => {
const manageTimelineForTesting = {
foo: {
...timelineDefaults,
id: 'foo',
...getTimelineDefaults('foo'),
filterManager,
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { mockDataProviders } from './mock/mock_data_providers';
import { Providers } from './providers';
import { DELETE_CLASS_NAME, ENABLE_CLASS_NAME, EXCLUDE_CLASS_NAME } from './provider_item_actions';
import { useMountAppended } from '../../../../common/utils/use_mount_appended';
import { ManageGlobalTimeline, timelineDefaults } from '../../manage_timeline';
import { ManageGlobalTimeline, getTimelineDefaults } from '../../manage_timeline';

const mockUiSettingsForFilterManager = createKibanaCoreStartMock().uiSettings;

Expand All @@ -27,8 +27,7 @@ describe('Providers', () => {

const manageTimelineForTesting = {
foo: {
...timelineDefaults,
id: 'foo',
...getTimelineDefaults('foo'),
filterManager,
isLoading,
},
Expand Down

0 comments on commit 6a2cfcc

Please sign in to comment.