Skip to content

Commit

Permalink
updated & passing test scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Oct 1, 2024
1 parent c77835d commit 84d78e7
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ describe("payload generation", () => {
});

describe("back navigation", () => {
it.skip("sets the latest feature as the active tab when coming back", async () => {
it("sets the latest feature as the active tab when coming back", async () => {
const breadcrumb = {
auto: false,
data: {
Expand Down Expand Up @@ -621,18 +621,21 @@ describe("back navigation", () => {

// `previouslySubmittedData` is set when coming "back" or via Review "change"
const { getByTestId } = setup(
<MapAndLabel {...props} previouslySubmittedData={breadcrumb} />,
<MapAndLabel
{...props}
fn="trees"
previouslySubmittedData={breadcrumb}
/>,
);

const map = getByTestId("map-and-label-map");
// TODO figure out why this isn't getting set
expect(map).toHaveAttribute(
"drawgeojsondata",
JSON.stringify(breadcrumb["data"]["trees"]),
);

const secondTabPanel = getByTestId("vertical-tabpanel-1");
expect(secondTabPanel).toBeVisible();
expect(secondTabPanel).toHaveTextContent("Test Two");
expect(secondTabPanel).toHaveTextContent("Tree 2");
});
});

0 comments on commit 84d78e7

Please sign in to comment.