[#159] Can untoggle every calendars (#161)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2025-10-01 09:04:59 +02:00
committed by GitHub
parent 475ab79731
commit 17c6bf7bce
3 changed files with 23 additions and 7 deletions
+17
View File
@@ -250,4 +250,21 @@ describe("calendar Availability search", () => {
expect(spy).not.toHaveBeenCalledWith();
});
it("BUGFIX: can untoggle all personnal calendars", () => {
renderWithProviders(<CalendarTestWrapper />, {
user: preloadedState.user,
calendars: {
list: { "user1/cal1": preloadedState.calendars.list["user1/cal1"] },
pending: false,
},
});
const checkbox = screen.getByLabelText("Calendar personnal");
expect(checkbox).toBeChecked();
fireEvent.click(checkbox); // toggle off
expect(checkbox).not.toBeChecked();
});
});