fix: update tests for new Menubar UI implementation
- Remove refresh button test from Calendar.test.tsx - Update Menubar tests to pass required props (calendarRef, onRefresh, currentDate) - Update Calendar tests to pass calendarRef prop - Remove outdated test cases from MiniCalendarColor.test.tsx that tested old headerToolbar - Format code with prettier
This commit is contained in:
@@ -69,7 +69,8 @@ describe("CalendarApp integration", () => {
|
||||
},
|
||||
};
|
||||
|
||||
renderWithProviders(<CalendarApp />, preloadedState);
|
||||
const mockCalendarRef = { current: null };
|
||||
renderWithProviders(<CalendarApp calendarRef={mockCalendarRef} />, preloadedState);
|
||||
};
|
||||
|
||||
it("renders the event on the calendar and calendarRef works", async () => {
|
||||
@@ -157,7 +158,8 @@ describe("CalendarApp integration", () => {
|
||||
class: "PRIVATE",
|
||||
title: "Private Event",
|
||||
});
|
||||
renderWithProviders(<CalendarApp />, preloadedState);
|
||||
const mockCalendarRef = { current: null };
|
||||
renderWithProviders(<CalendarApp calendarRef={mockCalendarRef} />, preloadedState);
|
||||
|
||||
const eventEls = screen.getAllByText("Private Event");
|
||||
const found = eventEls.some((eventEl) =>
|
||||
@@ -171,7 +173,8 @@ describe("CalendarApp integration", () => {
|
||||
class: "CONFIDENTIAL",
|
||||
title: "Confidential Event",
|
||||
});
|
||||
renderWithProviders(<CalendarApp />, preloadedState);
|
||||
const mockCalendarRef = { current: null };
|
||||
renderWithProviders(<CalendarApp calendarRef={mockCalendarRef} />, preloadedState);
|
||||
|
||||
const eventEls = screen.getAllByText("Confidential Event");
|
||||
const found = eventEls.some((eventEl) =>
|
||||
@@ -185,7 +188,8 @@ describe("CalendarApp integration", () => {
|
||||
class: "PUBLIC",
|
||||
title: "Public Event",
|
||||
});
|
||||
renderWithProviders(<CalendarApp />, preloadedState);
|
||||
const mockCalendarRef = { current: null };
|
||||
renderWithProviders(<CalendarApp calendarRef={mockCalendarRef} />, preloadedState);
|
||||
|
||||
const eventEls = screen.getAllByText("Public Event");
|
||||
const found = eventEls.some((eventEl) =>
|
||||
|
||||
Reference in New Issue
Block a user