/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import { render, screen, fireEvent } from "@testing-library/react";
import React from "react";
import { MemoryRouter } from "react-router-dom";
import Navigation from "../Navigation";
describe("Navigation", () => {
const props = {
stickyPosition: 0,
offset: 0,
widgetNameIds: [
{
name: "first widget",
id: "uuid",
isInsideSection: false,
sectionWithTabs: "",
},
{
name: "second widget",
id: "uuid-2",
isInsideSection: false,
sectionWithTabs: "",
},
],
activeWidgetId: "uuid",
onBottomOfThePage: jest.fn(),
isTop: false,
area: 2,
marginRight: 0,
displayTableOfContents: true,
onClick: jest.fn(),
};
test("renders the component", async () => {
const wrapper = render(