diff --git a/editor.planx.uk/src/components/Feedback/MoreInfoFeedback.test.tsx b/editor.planx.uk/src/components/Feedback/MoreInfoFeedback.test.tsx index 60232e83d5..cc4f3f879d 100644 --- a/editor.planx.uk/src/components/Feedback/MoreInfoFeedback.test.tsx +++ b/editor.planx.uk/src/components/Feedback/MoreInfoFeedback.test.tsx @@ -1,8 +1,4 @@ -import "@testing-library/jest-dom/extend-expect"; - import { fireEvent, waitFor } from "@testing-library/react"; -// eslint-disable-next-line no-restricted-imports -import userEvent from "@testing-library/user-event"; import { getInternalFeedbackMetadata, insertFeedbackMutation, @@ -64,17 +60,16 @@ describe("MoreInfoFeedbackComponent presentation and functionality", () => { // Form submission test("Submitting feedback changes view to thank you message", async () => { - const { getByText, getByTestId } = setup(); + const { getByText, getByTestId, user } = setup( + , + ); fireEvent.click(getByText("Yes")); await waitFor(() => { expect(getByTestId("userCommentTextarea")).toBeInTheDocument(); }); - await userEvent.type( - getByTestId("userCommentTextarea"), - "Great help, thanks!", - ); + await user.type(getByTestId("userCommentTextarea"), "Great help, thanks!"); fireEvent.click(getByText("Send feedback")); await waitFor(() => { @@ -129,7 +124,7 @@ describe("MoreInfoFeedbackComponent accessibility", () => { }); test("Thank you view should have no accessibility violations", async () => { - const { container, getByText, getByTestId } = setup( + const { container, getByText, getByTestId, user } = setup( , ); @@ -138,10 +133,7 @@ describe("MoreInfoFeedbackComponent accessibility", () => { expect(getByTestId("userCommentTextarea")).toBeInTheDocument(); }); - await userEvent.type( - getByTestId("userCommentTextarea"), - "Great help, thanks!", - ); + await user.type(getByTestId("userCommentTextarea"), "Great help, thanks!"); fireEvent.click(getByText("Send feedback"));