import React from "react";
import "@testing-library/jest-dom/extend-expect";
import { render } from "@testing-library/react";
import Navbar from "../navbar";

test("shows default navbar", () => {
  const { queryByTestId } = render(<Navbar data-testid="navbar" />);

  expect(queryByTestId("navbar")).toBeTruthy();
});

test("shows navbar with custom variant, bg and border", () => {
  const { queryByTestId } = render(
    <Navbar
      variant="light"
      bg="white"
      className="border-bottom border-light"
      data-testid="navbar"
    />
  );

  expect(queryByTestId("navbar")).toBeTruthy();
  expect(queryByTestId("navbar")).toHaveClass("bg-white");
  expect(queryByTestId("navbar")).toHaveClass("navbar-light");
  expect(queryByTestId("navbar")).toHaveClass("border-light");
});
