Skip to content

Commit

Permalink
removed commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
phamaiden committed Jun 2, 2024
1 parent 3121331 commit 04eb3e4
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,14 @@ describe("PersonalSchedulesCreatePage tests", () => {
const descriptionField = screen.getByTestId(
"PersonalScheduleForm-description",
);
//const quarterField = document.querySelector("#PersonalScheduleForm-quarter");
const quarterField = document.querySelector(
"#PersonalScheduleForm-quarter",
);
//const selectQuarter = getByLabelText("Quarter")
const submitButton = screen.getByTestId("PersonalScheduleForm-submit");

fireEvent.change(nameField, { target: { value: "SampName" } });
fireEvent.change(descriptionField, { target: { value: "desc" } });
fireEvent.change(quarterField, { target: { value: "20124" } });
//userEvent.selectOptions(selectQuarter, "20124");

expect(submitButton).toBeInTheDocument();

Expand All @@ -103,7 +100,6 @@ describe("PersonalSchedulesCreatePage tests", () => {
await waitFor(() => expect(axiosMock.history.post.length).toBe(1));

expect(quarterField).toHaveValue("20124");
//expect(setQuarter).toBeCalledWith("20124"); //need this and axiosMock below?

expect(axiosMock.history.post[0].params).toEqual({
name: "SampName",
Expand Down Expand Up @@ -158,7 +154,6 @@ describe("PersonalSchedulesCreatePage tests", () => {
await waitFor(() => expect(axiosMock.history.post.length).toBe(1));

expect(quarterField).toHaveValue("20124");
//expect(setQuarter).toBeCalledWith("20124"); //need this and axiosMock below?

expect(axiosMock.history.post[0].params).toEqual({
name: "Duplicate",
Expand All @@ -169,7 +164,6 @@ describe("PersonalSchedulesCreatePage tests", () => {
expect(mockToast).toBeCalledWith(
"Error: A personal schedule with that name already exists in that quarter",
);
// expect(mockNavigate).toBeCalledWith({ "to": "/personalschedules/list" });
});
test("filling the form with no description gives no error", async () => {
const queryClient = new QueryClient();
Expand All @@ -196,16 +190,13 @@ describe("PersonalSchedulesCreatePage tests", () => {
).toBeInTheDocument();

const nameField = screen.getByTestId("PersonalScheduleForm-name");
//const quarterField = document.querySelector("#PersonalScheduleForm-quarter");
const quarterField = document.querySelector(
"#PersonalScheduleForm-quarter",
);
//const selectQuarter = getByLabelText("Quarter")
const submitButton = screen.getByTestId("PersonalScheduleForm-submit");

fireEvent.change(nameField, { target: { value: "SampName" } });
fireEvent.change(quarterField, { target: { value: "20124" } });
//userEvent.selectOptions(selectQuarter, "20124");

expect(submitButton).toBeInTheDocument();

Expand All @@ -214,7 +205,6 @@ describe("PersonalSchedulesCreatePage tests", () => {
await waitFor(() => expect(axiosMock.history.post.length).toBe(1));

expect(quarterField).toHaveValue("20124");
//expect(setQuarter).toBeCalledWith("20124"); //need this and axiosMock below?

expect(axiosMock.history.post[0].params).toEqual({
name: "SampName",
Expand Down

0 comments on commit 04eb3e4

Please sign in to comment.