[fix] bug where mini calendar doesnt follow full one when week goes from one month to another

This commit is contained in:
Camille Moussu
2025-07-24 10:59:28 +02:00
committed by Benoit TELLIER
parent 432b626be4
commit cac89e7d02
2 changed files with 14 additions and 9 deletions
@@ -219,4 +219,17 @@ describe("Found Bugs", () => {
expect(weekViewSelectedTiles).toHaveLength(7);
});
it("gray day stays when day mode, change day, then change to week view", async () => {
jest.useFakeTimers().setSystemTime(new Date("2025-01-30"));
renderCalendar();
const nextWeekButton = screen.getByTitle("Next week");
fireEvent.click(nextWeekButton);
const miniCalMonth = await screen.findByTitle(/mini calendar month/i);
const fullCalMonth = screen.getByText((content, element) => {
return element?.className.includes("fc-toolbar-title") ?? false;
});
expect(miniCalMonth.innerHTML).toBe(fullCalMonth.innerHTML);
});
});