-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '7.x' into backport/7.x/pr-63558
- Loading branch information
Showing
115 changed files
with
2,221 additions
and
416 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
18 changes: 18 additions & 0 deletions
18
...acy/plugins/siem/public/pages/detection_engine/components/activity_monitor/index.test.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,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { ActivityMonitor } from './index'; | ||
|
||
describe('activity_monitor', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow(<ActivityMonitor />); | ||
|
||
expect(wrapper.find('[title="Activity monitor"]')).toBeTruthy(); | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
...siem/public/pages/detection_engine/components/detection_engine_header_page/index.test.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,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { DetectionEngineHeaderPage } from './index'; | ||
|
||
describe('detection_engine_header_page', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow(<DetectionEngineHeaderPage title="Title" />); | ||
|
||
expect(wrapper.find('[title="Title"]')).toBeTruthy(); | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
...s/siem/public/pages/detection_engine/components/no_api_integration_callout/index.test.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,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { NoApiIntegrationKeyCallOut } from './index'; | ||
|
||
describe('no_api_integration_callout', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow(<NoApiIntegrationKeyCallOut />); | ||
|
||
expect(wrapper.find('EuiCallOut')).toBeTruthy(); | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
...ins/siem/public/pages/detection_engine/components/no_write_signals_callout/index.test.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,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { NoWriteSignalsCallOut } from './index'; | ||
|
||
describe('no_write_signals_callout', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow(<NoWriteSignalsCallOut />); | ||
|
||
expect(wrapper.find('EuiCallOut')).toBeTruthy(); | ||
}); | ||
}); |
43 changes: 43 additions & 0 deletions
43
x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/index.test.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,43 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { SignalsTableComponent } from './index'; | ||
|
||
describe('SignalsTableComponent', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow( | ||
<SignalsTableComponent | ||
canUserCRUD | ||
hasIndexWrite | ||
from={0} | ||
loading | ||
signalsIndex="index" | ||
to={1} | ||
globalQuery={{ | ||
query: 'query', | ||
language: 'language', | ||
}} | ||
globalFilters={[]} | ||
deletedEventIds={[]} | ||
loadingEventIds={[]} | ||
selectedEventIds={{}} | ||
isSelectAllChecked={false} | ||
clearSelected={jest.fn()} | ||
setEventsLoading={jest.fn()} | ||
clearEventsLoading={jest.fn()} | ||
setEventsDeleted={jest.fn()} | ||
clearEventsDeleted={jest.fn()} | ||
updateTimelineIsLoading={jest.fn()} | ||
updateTimeline={jest.fn()} | ||
/> | ||
); | ||
|
||
expect(wrapper.find('[title="Signals"]')).toBeTruthy(); | ||
}); | ||
}); |
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
18 changes: 18 additions & 0 deletions
18
...siem/public/pages/detection_engine/components/signals/signals_filter_group/index.test.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,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { SignalsTableFilterGroup } from './index'; | ||
|
||
describe('SignalsTableFilterGroup', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow(<SignalsTableFilterGroup onFilterGroupChanged={jest.fn()} />); | ||
|
||
expect(wrapper.find('EuiFilterButton')).toBeTruthy(); | ||
}); | ||
}); |
92 changes: 0 additions & 92 deletions
92
...em/public/pages/detection_engine/components/signals/signals_utility_bar/batch_actions.tsx
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
.../siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.test.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; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { SignalsUtilityBar } from './index'; | ||
|
||
jest.mock('../../../../../lib/kibana'); | ||
|
||
describe('SignalsUtilityBar', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow( | ||
<SignalsUtilityBar | ||
canUserCRUD={true} | ||
hasIndexWrite={true} | ||
areEventsLoading={false} | ||
clearSelection={jest.fn()} | ||
totalCount={100} | ||
selectedEventIds={{}} | ||
isFilteredToOpen={false} | ||
selectAll={jest.fn()} | ||
showClearSelection={true} | ||
updateSignalsStatus={jest.fn()} | ||
/> | ||
); | ||
|
||
expect(wrapper.find('[dataTestSubj="openCloseSignal"]')).toBeTruthy(); | ||
}); | ||
}); |
29 changes: 29 additions & 0 deletions
29
...gins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.test.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,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { SignalsHistogramPanel } from './index'; | ||
|
||
jest.mock('../../../../lib/kibana'); | ||
jest.mock('../../../../components/navigation/use_get_url_search'); | ||
|
||
describe('SignalsHistogramPanel', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow( | ||
<SignalsHistogramPanel | ||
from={0} | ||
signalIndexName="signalIndexName" | ||
setQuery={jest.fn()} | ||
to={1} | ||
updateDateRange={jest.fn()} | ||
/> | ||
); | ||
|
||
expect(wrapper.find('[id="detections-histogram"]')).toBeTruthy(); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
...blic/pages/detection_engine/components/signals_histogram_panel/signals_histogram.test.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,22 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { SignalsHistogram } from './signals_histogram'; | ||
|
||
jest.mock('../../../../lib/kibana'); | ||
|
||
describe('SignalsHistogram', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow( | ||
<SignalsHistogram loading={false} data={[]} from={0} to={1} updateDateRange={jest.fn()} /> | ||
); | ||
|
||
expect(wrapper.find('Chart')).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.