Skip to content

Commit

Permalink
remove redundant variables / imports
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 committed Sep 17, 2024
1 parent 4dc393c commit 9f49a74
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -346,8 +346,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(<MapAndLabel {...props} />);
const map = getByTestId("map-and-label-map");
const { getByTitle } = setup(<MapAndLabel {...props} />);

addMultipleFeatures([point1, point2]);

const copyTitle = getByTitle("Copy from");
Expand All @@ -358,10 +358,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(
<MapAndLabel {...props} />
);
const map = getByTestId("map-and-label-map");
const { getByTitle, user, queryByRole } = setup(<MapAndLabel {...props} />);
addMultipleFeatures([point1, point2]);

const copyTitle = getByTitle("Copy from");
Expand All @@ -379,10 +376,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(
<MapAndLabel {...props} />
);
const map = getByTestId("map-and-label-map");
addMultipleFeatures([point1, point2]);
const tabOne = getByRole("tab", { name: /Tree 1/ });

Expand Down Expand Up @@ -424,10 +420,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(
<MapAndLabel {...props} />
);
const map = getByTestId("map-and-label-map");
const { getByTitle, user, container } = setup(<MapAndLabel {...props} />);
addMultipleFeatures([point1, point2]);

const copyTitle = getByTitle("Copy from");
Expand Down

0 comments on commit 9f49a74

Please sign in to comment.