Skip to content

Commit 2f30d4b

Browse files
committed
test: Update CalendarComponent tests to include inline mode and adjust accessibility attributes
1 parent d88cee8 commit 2f30d4b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/calendar_test.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2703,13 +2703,14 @@ describe("Calendar", () => {
27032703
onClickOutside={() => {}}
27042704
onSelect={() => {}}
27052705
dropdownMode="scroll"
2706+
inline
27062707
/>,
27072708
);
27082709

27092710
const dialog = container.querySelector(".react-datepicker");
27102711
expect(dialog).not.toBeNull();
2711-
expect(dialog).not.toHaveProperty("role");
2712-
expect(dialog).not.toHaveProperty("aria-modal");
2712+
expect(dialog?.getAttribute("role")).toBeNull();
2713+
expect(dialog?.getAttribute("aria-modal")).toBeNull();
27132714
expect(dialog?.getAttribute("aria-label")).toBe("Choose Date");
27142715
});
27152716

0 commit comments

Comments
 (0)