Skip to content

Commit 7325c37

Browse files
committed
fix: clearer test
1 parent 1fc36fa commit 7325c37

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/include_times_test.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,23 @@ describe("TimeComponent", () => {
6767
/>,
6868
);
6969

70+
const allTimeItems = timeComponent.querySelectorAll(
71+
".react-datepicker__time-list-item",
72+
);
73+
74+
// 01:00:30 and 00:00:30 should be correctly visible in the time list
75+
expect(Array.from(allTimeItems).map((node) => node.textContent)).toContain(
76+
"01:00:30",
77+
);
78+
expect(Array.from(allTimeItems).map((node) => node.textContent)).toContain(
79+
"00:00:30",
80+
);
81+
7082
const disabledTimeItems = timeComponent.querySelectorAll(
7183
".react-datepicker__time-list-item--disabled",
7284
);
7385

86+
// 01:00:00 and 00:00:00 should be correctly disabled
7487
expect(
7588
Array.from(disabledTimeItems).map((node) => node.textContent),
7689
).toContain("01:00:00");

0 commit comments

Comments
 (0)