diff --git a/editor.planx.uk/src/@planx/components/MapAndLabel/Public/index.test.tsx b/editor.planx.uk/src/@planx/components/MapAndLabel/Public/index.test.tsx index 94b3559ac1..ed15cdaa51 100644 --- a/editor.planx.uk/src/@planx/components/MapAndLabel/Public/index.test.tsx +++ b/editor.planx.uk/src/@planx/components/MapAndLabel/Public/index.test.tsx @@ -1,6 +1,6 @@ import { MyMap } from "@opensystemslab/map"; import { Presentational as MapAndLabel } from "@planx/components/MapAndLabel/Public"; -import { screen, waitFor, within } from "@testing-library/react"; +import { waitFor, within } from "@testing-library/react"; import React from "react"; import { setup } from "testUtils"; import { vi } from "vitest"; @@ -245,8 +245,8 @@ describe("copy feature select", () => { }); // no copy select if only one feature it("is enabled once multiple features are present", async () => { - const { getByTestId, getByTitle } = setup(); - const map = getByTestId("map-and-label-map"); + const { getByTitle } = setup(); + addMultipleFeatures([point1, point2]); const copyTitle = getByTitle("Copy from"); @@ -257,10 +257,7 @@ describe("copy feature select", () => { }); // copy select enabled once you add more features it("lists all other features as options (the current feature is not listed)", async () => { - const { getByTestId, getByTitle, user, queryByRole } = setup( - - ); - const map = getByTestId("map-and-label-map"); + const { getByTitle, user, queryByRole } = setup(); addMultipleFeatures([point1, point2]); const copyTitle = getByTitle("Copy from"); @@ -278,10 +275,9 @@ describe("copy feature select", () => { }); // current tree is not an option in the copy select it("copies all data from one feature to another", async () => { - const { getByTestId, getByTitle, user, getByLabelText, getByRole } = setup( + const { getByTitle, user, getByLabelText, getByRole } = setup( ); - const map = getByTestId("map-and-label-map"); addMultipleFeatures([point1, point2]); const tabOne = getByRole("tab", { name: /Tree 1/ }); @@ -323,10 +319,7 @@ describe("copy feature select", () => { }); // all data fields are populated from one field to another it("should not have any accessibility violations", async () => { - const { getByTestId, getByTitle, user, container } = setup( - - ); - const map = getByTestId("map-and-label-map"); + const { getByTitle, user, container } = setup(); addMultipleFeatures([point1, point2]); const copyTitle = getByTitle("Copy from");