import { jsx } from "react/jsx-runtime";
import React from "react";
import { screen, render } from "@testing-library/react";
import { ThemeProvider, Header } from "../..";
describe("<Header />", () => {
  it("should match snapshot", () => {
    const { container } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Header, {}) })
    );
    expect(container).toMatchSnapshot();
  });
  it("should have link", () => {
    const gympassLink = "https://site.gympass.com/br";
    render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Header, { link: gympassLink }) })
    );
    screen.getByRole("link", { href: gympassLink });
  });
  it("should show gympass logo", () => {
    render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Header, {}) })
    );
    screen.getByTitle("Gympass Logo");
  });
  it("should show custom logo", () => {
    const CustomLogo = () => /* @__PURE__ */ jsx("div", { children: "Custom logo" });
    render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Header, { logo: CustomLogo }) })
    );
    screen.getByText("Custom logo");
  });
  it("should show children", () => {
    render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx("p", { children: "Make wellbeing universal" }) }) })
    );
    screen.getByText("Make wellbeing universal");
  });
});
