Skip to content

Commit

Permalink
test: hides time caption
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik Kubitza committed Sep 19, 2024
1 parent aea8f6d commit 2771fe4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/timepicker_test.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,23 @@ describe("TimePicker", () => {
expect(onKeyDownSpy).toHaveBeenCalledTimes(1);
});

it("hides time caption", () => {
const { container } = render(
<DatePicker
open
showTimeSelect
showTimeSelectOnly
showTimeCaption={false}
/>,
);

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");
Expand Down

0 comments on commit 2771fe4

Please sign in to comment.