diff --git a/__test__/components/DuplicateEvent.test.tsx b/__test__/components/DuplicateEvent.test.tsx
index 820819a..32fff1a 100644
--- a/__test__/components/DuplicateEvent.test.tsx
+++ b/__test__/components/DuplicateEvent.test.tsx
@@ -3,6 +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";
const day = new Date();
const preloadedState = {
@@ -153,11 +154,12 @@ describe("EventPopover", () => {
describe("EventDisplayModal", () => {
it("shows duplication button and opens duplication form", () => {
renderWithProviders(
- ,
preloadedState
);
@@ -165,10 +167,10 @@ describe("EventDisplayModal", () => {
fireEvent.click(screen.getByTestId("AddToPhotosIcon"));
expect(screen.getByText(/Duplicate Event/i)).toBeInTheDocument();
expect(
- screen.getAllByDisplayValue(
+ screen.getByDisplayValue(
preloadedState.calendars.list["667037022b752d0026472254/cal1"].events
.event1.title
)
- ).toHaveLength(2);
+ ).toBeInTheDocument();
});
});
diff --git a/src/features/Events/EventDisplay.tsx b/src/features/Events/EventDisplay.tsx
index b28dd93..1aa235f 100644
--- a/src/features/Events/EventDisplay.tsx
+++ b/src/features/Events/EventDisplay.tsx
@@ -244,7 +244,6 @@ export default function EventDisplayModal({
{/* Close button */}
-
onClose({}, "backdropClick")}
diff --git a/src/features/Events/EventDisplayPreview.tsx b/src/features/Events/EventDisplayPreview.tsx
index a37e48c..7a58bb0 100644
--- a/src/features/Events/EventDisplayPreview.tsx
+++ b/src/features/Events/EventDisplayPreview.tsx
@@ -39,6 +39,7 @@ import EventDisplayModal, {
} from "./EventDisplay";
import { getEvent } from "./EventApi";
import { CalendarEvent } from "./EventsTypes";
+import EventDuplication from "../../components/Event/EventDuplicate";
export default function EventPreviewModal({
eventId,
@@ -122,6 +123,7 @@ export default function EventPreviewModal({
gap: 1,
}}
>
+
{mailSpaUrl && attendees.length > 0 && (