-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution][Cases] Re-enable timeline functionality (#96496)
- Loading branch information
1 parent
47b4a0f
commit 636524a
Showing
19 changed files
with
461 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
x-pack/plugins/cases/public/components/__mock__/timeline.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import React from 'react'; | ||
import { useTimelineContext } from '../timeline_context/use_timeline_context'; | ||
jest.mock('../timeline_context'); | ||
|
||
const mockTimelineComponent = (name: string) => <span data-test-subj={name}>{name}</span>; | ||
|
||
export const timelineIntegrationMock = { | ||
editor_plugins: { | ||
parsingPlugin: jest.fn(), | ||
processingPluginRenderer: () => mockTimelineComponent('plugin-renderer'), | ||
uiPlugin: { | ||
name: 'mock-timeline', | ||
button: { label: 'mock-timeline-button', iconType: 'mock-timeline-icon' }, | ||
editor: () => mockTimelineComponent('plugin-timeline-editor'), | ||
}, | ||
}, | ||
hooks: { | ||
useInsertTimeline: jest.fn(), | ||
}, | ||
ui: { | ||
renderInvestigateInTimelineActionComponent: () => | ||
mockTimelineComponent('investigate-in-timeline'), | ||
renderTimelineDetailsPanel: () => mockTimelineComponent('timeline-details-panel'), | ||
}, | ||
}; | ||
|
||
export const useTimelineContextMock = useTimelineContext as jest.Mock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.