-
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.
- Loading branch information
Showing
7 changed files
with
226 additions
and
330 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
62 changes: 62 additions & 0 deletions
62
...security_solution/public/common/components/visualization_actions/__mocks__/use_actions.ts
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,62 @@ | ||
/* | ||
* 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. | ||
*/ | ||
export const VISUALIZATION_CONTEXT_MENU_TRIGGER = 'VISUALIZATION_CONTEXT_MENU_TRIGGER'; | ||
export const DEFAULT_ACTIONS = [ | ||
'inspect', | ||
'addToNewCase', | ||
'addToExistingCase', | ||
'saveToLibrary', | ||
'openInLens', | ||
]; | ||
export const MOCK_ACTIONS = [ | ||
{ | ||
id: 'inspect', | ||
getDisplayName: () => 'Inspect', | ||
getIconType: () => 'inspect', | ||
type: 'actionButton', | ||
order: 4, | ||
isCompatible: () => true, | ||
execute: jest.fn(), | ||
}, | ||
{ | ||
id: 'addToNewCase', | ||
getDisplayName: () => 'Add to new case', | ||
getIconType: () => 'casesApp', | ||
type: 'actionButton', | ||
order: 3, | ||
isCompatible: () => true, | ||
execute: jest.fn(), | ||
}, | ||
{ | ||
id: 'addToExistingCase', | ||
getDisplayName: () => 'Add to existing case', | ||
getIconType: () => 'casesApp', | ||
type: 'actionButton', | ||
order: 2, | ||
isCompatible: () => true, | ||
execute: jest.fn(), | ||
}, | ||
{ | ||
id: 'saveToLibrary', | ||
getDisplayName: () => 'Added to library', | ||
getIconType: () => 'save', | ||
type: 'actionButton', | ||
order: 1, | ||
isCompatible: () => true, | ||
execute: jest.fn(), | ||
}, | ||
{ | ||
id: 'openInLens', | ||
getDisplayName: () => 'Open in Lens', | ||
getIconType: () => 'visArea', | ||
type: 'actionButton', | ||
order: 0, | ||
isCompatible: () => true, | ||
execute: jest.fn(), | ||
}, | ||
]; | ||
export const useActions = jest.fn().mockReturnValue(MOCK_ACTIONS); |
Oops, something went wrong.