Skip to content

Commit

Permalink
[Security Solution] styling for reason popover (#111338) (#111400)
Browse files Browse the repository at this point in the history
* add panelClassName

* remove unused data-test-subj

Co-authored-by: Angela Chuang <[email protected]>
  • Loading branch information
kibanamachine and angorayc authored Sep 7, 2021
1 parent 32abdc7 commit 403ac3d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,22 @@ describe('reasonColumnRenderer', () => {

expect(wrapper.queryByTestId('test-row-render')).toBeInTheDocument();
});

it('the popover always contains a class that hides it when an overlay (e.g. the inspect modal) is displayed', () => {
const renderedColumn = reasonColumnRenderer.renderColumn({
...defaultProps,
ecsData: validEcs,
rowRenderers,
browserFields,
});

const wrapper = render(<TestProviders>{renderedColumn}</TestProviders>);

fireEvent.click(wrapper.getByTestId('reason-cell-button'));

expect(wrapper.getByRole('dialog')).toHaveClass(
'euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--noShadow euiPopover__panel euiPopover__panel--right withHoverActions__popover'
);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const ReasonCell: React.FC<{
isOpen={isOpen}
anchorPosition="rightCenter"
closePopover={handleClosePopOver}
panelClassName="withHoverActions__popover"
button={button}
>
<EuiPopoverTitle paddingSize="s">
Expand Down

0 comments on commit 403ac3d

Please sign in to comment.