mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[SIEM] Fix layout issue for open timeline modal (#61786)
* show icon on open timeline modal * add unit test Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
2c60c5e005
commit
f21dea11c3
2 changed files with 20 additions and 0 deletions
|
@ -70,6 +70,25 @@ describe('#getActionsColumns', () => {
|
|||
expect(wrapper.find('[data-test-subj="open-duplicate"]').exists()).toBe(true);
|
||||
});
|
||||
|
||||
test('it renders only duplicate icon (without heading)', () => {
|
||||
const testProps: TimelinesTableProps = {
|
||||
...getMockTimelinesTableProps(mockResults),
|
||||
actionTimelineToShow: ['duplicate'],
|
||||
};
|
||||
const wrapper = mountWithIntl(
|
||||
<ThemeProvider theme={theme}>
|
||||
<TimelinesTable {...testProps} />
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
expect(
|
||||
wrapper
|
||||
.find('[data-test-subj="open-duplicate"]')
|
||||
.first()
|
||||
.text()
|
||||
).toEqual('');
|
||||
});
|
||||
|
||||
test('it does NOT render the duplicate timeline when actionTimelineToShow is NOT including the action duplicate)', () => {
|
||||
const testProps: TimelinesTableProps = {
|
||||
...getMockTimelinesTableProps(mockResults),
|
||||
|
|
|
@ -42,6 +42,7 @@ export const getActionsColumns = ({
|
|||
timelineId: savedObjectId ?? '',
|
||||
});
|
||||
},
|
||||
type: 'icon',
|
||||
enabled: ({ savedObjectId }: OpenTimelineResult) => savedObjectId != null,
|
||||
description: i18n.OPEN_AS_DUPLICATE,
|
||||
'data-test-subj': 'open-duplicate',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue