From 2771fe419dbdf2463fd431c7f734cf93bf2b6bd7 Mon Sep 17 00:00:00 2001 From: Henrik Kubitza Date: Thu, 19 Sep 2024 16:25:35 +0200 Subject: [PATCH] test: hides time caption --- src/test/timepicker_test.test.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/test/timepicker_test.test.tsx b/src/test/timepicker_test.test.tsx index f8d664633..7fd0e8fa8 100644 --- a/src/test/timepicker_test.test.tsx +++ b/src/test/timepicker_test.test.tsx @@ -316,6 +316,23 @@ describe("TimePicker", () => { expect(onKeyDownSpy).toHaveBeenCalledTimes(1); }); + it("hides time caption", () => { + const { container } = render( + , + ); + + const header = container.querySelector( + ".react-datepicker__header--time--only", + ); + + expect(header).toBeNull(); + }); + function setManually(string: string) { if (!instance?.input) { throw new Error("input is null/undefined");