From ba63ef23b849a0ff31b7fdd8c1f8c7f1c7f688c6 Mon Sep 17 00:00:00 2001 From: Jan Monschke Date: Tue, 2 Apr 2024 20:37:55 +0200 Subject: [PATCH] update tests --- .../components/timeline/body/index.test.tsx | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx index 6c4f280c6fd46..231e32a7298e6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx @@ -358,6 +358,7 @@ describe('Body', () => { eventId: '1', id: 'timeline-test', noteId: expect.anything(), + pinEvent: true, }, type: timelineActions.addNoteToEvent({ eventId: '1', @@ -366,13 +367,6 @@ describe('Body', () => { }).type, }) ); - expect(mockDispatch).toHaveBeenNthCalledWith( - 3, - timelineActions.pinEvent({ - eventId: '1', - id: 'timeline-test', - }) - ); }); test('Add two notes to an event', async () => { @@ -385,7 +379,7 @@ describe('Body', () => { [TimelineId.test]: { ...mockGlobalState.timeline.timelineById[TimelineId.test], id: 'timeline-test', - pinnedEventIds: { 1: true }, // we should NOT dispatch a pin event, because it's already pinned + pinnedEventIds: { 1: true }, }, }, }, @@ -407,6 +401,7 @@ describe('Body', () => { eventId: '1', id: 'timeline-test', noteId: expect.anything(), + pinEvent: false, }, type: timelineActions.addNoteToEvent({ eventId: '1', @@ -415,13 +410,6 @@ describe('Body', () => { }).type, }) ); - - expect(mockDispatch).not.toHaveBeenCalledWith( - timelineActions.pinEvent({ - eventId: '1', - id: 'timeline-test', - }) - ); }); });