import { render } from "@testing-library/react";
import { axe } from "vitest-axe";

import { Stepbar } from "../";

const example = (
  <Stepbar
    steps={[
      {
        title: "1. Paušál",
        href: "#",
      },
      {
        title: "2. Internet",
        href: "#",
        isCurrent: true,
      },
      {
        title: "3. TV (nepovinné)",
        href: "#",
      },
    ]}
  />
);

it("is valid html", () => {
  const { container } = render(example);
  expect(container).toHTMLValidate();
});

it("is accessible", async () => {
  const { container } = render(example);
  expect(await axe(container)).toHaveNoViolations();
});
