[#596] displays all calendar from user in search even if one of them is present in the list of shared/delegated calendars (#604)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2026-03-03 21:12:45 +01:00
committed by GitHub
parent edf158f13f
commit 4d16d19132
3 changed files with 3 additions and 75 deletions
-30
View File
@@ -290,36 +290,6 @@ describe("calendar Availability search", () => {
expect(spy).toHaveBeenCalled();
});
it("does not import temp calendars if user already has a calendar but toggles the shared one", async () => {
mockedSearchUsers.mockResolvedValueOnce([
{
email: "alice@example.com",
displayName: "Alice",
avatarUrl: "image.png",
openpaasId: "1234567890",
},
]);
const spy = jest
.spyOn(servicesModule, "getTempCalendarsListAsync")
.mockImplementation((payload) => {
return () => Promise.resolve(payload) as any;
});
await act(async () =>
renderWithProviders(<CalendarTestWrapper />, preloadedState)
);
const input = screen.getByPlaceholderText(
"peopleSearch.availabilityPlaceholder"
);
await act(async () => userEvent.type(input, "Alice"));
const option = await screen.findByText("Alice");
await act(async () => {
fireEvent.click(option);
});
expect(spy).not.toHaveBeenCalled();
});
it("open window with attendees filled after temp search on create event button click", async () => {
const spy = jest
.spyOn(servicesModule, "getTempCalendarsListAsync")