[#162] changed preview modal looks to follow figma (#163)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2025-10-07 11:20:09 +02:00
committed by GitHub
parent 40c383c334
commit 3f8f3eff23
14 changed files with 731 additions and 619 deletions
+7 -8
View File
@@ -3,7 +3,7 @@ import EventDuplication from "../../src/components/Event/EventDuplicate";
import EventDisplayModal from "../../src/features/Events/EventDisplay";
import EventPopover from "../../src/features/Events/EventModal";
import { renderWithProviders } from "../utils/Renderwithproviders";
import EventPreviewModal from "../../src/features/Events/EventDisplayPreview";
import EventPreviewModal from "../../src/components/Event/EventDisplayPreview";
const day = new Date();
const preloadedState = {
@@ -75,10 +75,9 @@ describe("EventDuplication", () => {
preloadedState
);
const button = screen.getByRole("button");
fireEvent.click(button);
fireEvent.click(screen.getByText("Duplicate event"));
expect(screen.getByText(/Duplicate Event/i)).toBeInTheDocument();
expect(screen.getAllByText(/Duplicate Event/i)[1]).toBeInTheDocument();
});
it("calls onClose when closing the popover", () => {
@@ -94,7 +93,7 @@ describe("EventDuplication", () => {
preloadedState
);
fireEvent.click(screen.getByRole("button"));
fireEvent.click(screen.getByText("Duplicate event"));
fireEvent.click(screen.getByRole("button", { name: /Cancel/i }));
@@ -159,13 +158,13 @@ describe("EventDisplayModal", () => {
calId="667037022b752d0026472254/cal1"
open={true}
onClose={jest.fn()}
anchorPosition={{ top: 0, left: 0 }}
/>,
preloadedState
);
fireEvent.click(screen.getByTestId("AddToPhotosIcon"));
expect(screen.getByText(/Duplicate Event/i)).toBeInTheDocument();
fireEvent.click(screen.getByTestId("MoreVertIcon"));
fireEvent.click(screen.getByText("Duplicate event"));
expect(screen.getAllByText(/Duplicate Event/i)[1]).toBeInTheDocument();
expect(
screen.getByDisplayValue(
preloadedState.calendars.list["667037022b752d0026472254/cal1"].events