feat: Update Event Preview Modal UI with custom MUI theme (#240)

- Add custom MUI theme
- Update ResponsiveDialog with actionsBorderTop prop for modal footer border
- Redesign EventDisplayPreview modal with improved typography and spacing
- Replace ButtonGroup with individual RSVP buttons (Accept/Maybe/Decline)
- Add pill-shaped buttons for RSVP actions
- Ensure backward compatibility with existing modals
This commit is contained in:
lenhanphung
2025-10-27 12:23:42 +07:00
committed by GitHub
parent 51c9d68be2
commit 4774e78543
12 changed files with 358 additions and 118 deletions
+4 -25
View File
@@ -62,8 +62,9 @@ const preloadedState = {
};
describe("EventDuplication", () => {
it("opens EventPopover when button clicked", () => {
it("calls onOpenDuplicate when button clicked", () => {
const handleClose = jest.fn();
const onOpenDuplicate = jest.fn();
renderWithProviders(
<EventDuplication
event={
@@ -71,36 +72,14 @@ describe("EventDuplication", () => {
.event1
}
onClose={handleClose}
onOpenDuplicate={onOpenDuplicate}
/>,
preloadedState
);
fireEvent.click(screen.getByRole("menuitem", { name: /Duplicate event/i }));
expect(screen.getAllByText(/Duplicate Event/i)[1]).toBeInTheDocument();
});
it("calls onClose when closing the popover", () => {
const handleClose = jest.fn();
renderWithProviders(
<EventDuplication
event={
preloadedState.calendars.list["667037022b752d0026472254/cal1"].events
.event1
}
onClose={handleClose}
/>,
preloadedState
);
fireEvent.click(screen.getByRole("menuitem", { name: /Duplicate event/i }));
// Cancel button only appears in expanded mode
fireEvent.click(screen.getByRole("button", { name: /More options/i }));
fireEvent.click(screen.getByRole("button", { name: /Cancel/i }));
expect(handleClose).toHaveBeenCalled();
expect(onOpenDuplicate).toHaveBeenCalled();
});
});