From 442830c10ab7c47fc7900610f50fe217fa6810f0 Mon Sep 17 00:00:00 2001 From: Eldar <61377022+EldarMuhamethanov@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:33:37 +0300 Subject: [PATCH 1/2] fix(Calendar): fixed props passing with id for testing from Calendar to CalendarTime (#7928) (cherry picked from commit 75f5a11428b51a0d18229a6ca73e0e0eb5aec4d9) --- packages/vkui/src/components/Calendar/Calendar.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/vkui/src/components/Calendar/Calendar.tsx b/packages/vkui/src/components/Calendar/Calendar.tsx index b3eac576ae..93d767da77 100644 --- a/packages/vkui/src/components/Calendar/Calendar.tsx +++ b/packages/vkui/src/components/Calendar/Calendar.tsx @@ -137,6 +137,9 @@ export const Calendar = ({ renderDayContent, minDateTime, maxDateTime, + minutesTestId, + hoursTestId, + doneButtonTestId, prevMonthButtonTestId, nextMonthButtonTestId, monthDropdownTestId, @@ -274,6 +277,9 @@ export const Calendar = ({ changeHoursLabel={changeHoursLabel} changeMinutesLabel={changeMinutesLabel} isDayDisabled={minDateTime || maxDateTime ? isDayDisabled : undefined} + minutesTestId={minutesTestId} + hoursTestId={hoursTestId} + doneButtonTestId={doneButtonTestId} /> )} From d50b3f0093a7432022b53633c33fa362c0263384 Mon Sep 17 00:00:00 2001 From: "e.muhamethanov" Date: Tue, 12 Nov 2024 14:05:01 +0300 Subject: [PATCH 2/2] fix(CustomResizeObserver): fix test --- packages/vkui/src/components/DateInput/DateInput.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vkui/src/components/DateInput/DateInput.test.tsx b/packages/vkui/src/components/DateInput/DateInput.test.tsx index 438f5b11bb..352eb9334f 100644 --- a/packages/vkui/src/components/DateInput/DateInput.test.tsx +++ b/packages/vkui/src/components/DateInput/DateInput.test.tsx @@ -111,8 +111,8 @@ describe('DateInput', () => { it('should call onChange with zero sec/ms', async () => { jest.useFakeTimers(); const onChange = jest.fn(); - const { container } = render(); - const inputLikes = getInputsLike(container); + render(); + const inputLikes = getInputsLike(); const [dates, months, years] = inputLikes;