From 03d1b537515b40f442e8ff0af96e60cb847dbcbf Mon Sep 17 00:00:00 2001 From: "e.muhamethanov" Date: Tue, 5 Nov 2024 14:05:12 +0300 Subject: [PATCH] test(DateRangeInput): fix test --- .../src/components/DateRangeInput/DateRangeInput.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vkui/src/components/DateRangeInput/DateRangeInput.test.tsx b/packages/vkui/src/components/DateRangeInput/DateRangeInput.test.tsx index 930808e382..b30571b360 100644 --- a/packages/vkui/src/components/DateRangeInput/DateRangeInput.test.tsx +++ b/packages/vkui/src/components/DateRangeInput/DateRangeInput.test.tsx @@ -143,7 +143,7 @@ describe('DateRangeInput', () => { jest.useFakeTimers(); const onCalendarOpenChanged = jest.fn(); const { container } = render( - , + , ); const inputLikes = getInputsLike(container); const [dates] = inputLikes; @@ -154,7 +154,7 @@ describe('DateRangeInput', () => { expect(onCalendarOpenChanged.mock.calls[0][0]).toBeTruthy(); expect(container.contains(document.activeElement)).toBeTruthy(); - await userEvent.click(screen.getAllByText('15')[0]); + await userEvent.click(screen.getAllByText('15')[1]); expect(onCalendarOpenChanged).toHaveBeenCalledTimes(2); expect(onCalendarOpenChanged.mock.calls[1][0]).toBeFalsy();