Skip to content

Commit 67c2fd8

Browse files
committed
🧹 Chore: delete commented code in Calendar.form.test
https://docs.compasscalendar.com/docs/contribute/convention-guide#no-dead-code
1 parent d7793ef commit 67c2fd8

File tree

1 file changed

+1
-51
lines changed

1 file changed

+1
-51
lines changed

packages/web/src/views/Calendar/Calendar.form.test.tsx

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { act } from "react";
22
import "@testing-library/jest-dom";
33
import { screen, waitFor, within } from "@testing-library/react";
4-
import userEvent, { UserEvent } from "@testing-library/user-event";
4+
import userEvent from "@testing-library/user-event";
55
import { CLIMB } from "@core/__mocks__/events/events.misc";
66
import { render } from "@web/__tests__/__mocks__/mock.render";
77
import { preloadedState } from "@web/__tests__/__mocks__/state/state.weekEvents";
@@ -67,53 +67,3 @@ describe("Event Form", () => {
6767
});
6868
});
6969
});
70-
71-
/***********
72-
* Helpers *
73-
***********/
74-
const _clickHeading = async (user: UserEvent) => {
75-
await user.click(screen.getByRole("heading", { level: 1 }));
76-
};
77-
78-
const _confirmCorrectEventFormIsOpen = async (eventName: string) => {
79-
await waitFor(() => {
80-
expect(
81-
within(screen.getByRole("form")).getByText(eventName),
82-
).toBeInTheDocument();
83-
});
84-
};
85-
// it("opens when clicking events", async () => {
86-
// const user = userEvent.setup();
87-
// render(<CalendarView />, { state: preloadedState });
88-
// expect(screen.queryByRole("form")).not.toBeInTheDocument();
89-
/* timed event */
90-
// await act(async () => {
91-
// await user.click(screen.getByRole("button", { name: /Ty & Tim/i }));
92-
// await _confirmCorrectEventFormIsOpen(TY_TIM.title);
93-
// });
94-
/* multi-week event */
95-
// await act(async () => {
96-
// await _clickHeading(user);
97-
// await user.click(
98-
// screen.getByRole("button", { name: /multiweek event/i })
99-
// );
100-
// });
101-
// await waitFor(
102-
// () => {
103-
// expect(screen.getByRole("form")).toBeInTheDocument();
104-
// },
105-
// { timeout: 10000 }
106-
// );
107-
// await _confirmCorrectEventFormIsOpen(MULTI_WEEK.title);
108-
// await waitFor(() => {
109-
// expect(
110-
// within(screen.getByRole("form")).getByText(MULTI_WEEK.title)
111-
// ).toBeInTheDocument();
112-
// });
113-
// /* someday event */
114-
// await _clickHeading(user);
115-
// await user.click(screen.getByRole("button", { name: /takeover world/i }));
116-
// expect(
117-
// within(screen.getRole("form", name: {"Someday Event Form"})).getByText("Takeover world")
118-
// ).toBeInTheDocument();
119-
// }, 20000);

0 commit comments

Comments
 (0)