mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Security Solution][Resolver]Enzyme test related events closing (#74811)
This commit is contained in:
parent
0e5ac40b00
commit
34195271c5
1 changed files with 19 additions and 1 deletions
|
@ -162,10 +162,28 @@ describe('Resolver, when analyzing a tree that has two related events for the or
|
|||
button.simulate('click');
|
||||
}
|
||||
});
|
||||
it('should open the submenu', async () => {
|
||||
it('should open the submenu and display exactly one option with the correct count', async () => {
|
||||
await expect(
|
||||
simulator.map(() => simulator.processNodeSubmenuItems().map((node) => node.text()))
|
||||
).toYieldEqualTo(['2 registry']);
|
||||
await expect(
|
||||
simulator.map(() => simulator.processNodeSubmenuItems().length)
|
||||
).toYieldEqualTo(1);
|
||||
});
|
||||
});
|
||||
describe('and when the related events button is clicked again', () => {
|
||||
beforeEach(async () => {
|
||||
const button = await simulator.resolveWrapper(() =>
|
||||
simulator.processNodeRelatedEventButton(entityIDs.origin)
|
||||
);
|
||||
if (button) {
|
||||
button.simulate('click');
|
||||
}
|
||||
});
|
||||
it('should close the submenu', async () => {
|
||||
await expect(
|
||||
simulator.map(() => simulator.processNodeSubmenuItems().length)
|
||||
).toYieldEqualTo(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue