/** @jest-environment jsdom */
import React from "react";
import { render } from "@testing-library/react";
import { OrganismBadgeCard, IBadgeCardProps } from "./index";

describe("[React] OrganismBadgeCard", () => {
  it("Rendered component", () => {
    const props: IBadgeCardProps = {
      img: "image.png",
      imgAlt: "Logo",
      badges: [
        {
          badgeText: "Rookie",
          badgeStatus: "completed",
          image: "https://i.ibb.co/0rW958L/cheers-2.png",
        },
      ],
    };
    const component = render(<OrganismBadgeCard {...props} />);
    expect(component).toBeTruthy();
  });

  it("Rendered component with img width", () => {
    const props: IBadgeCardProps = {
      img: "image.png",
      imgAlt: "Logo",
      badges: [
        {
          badgeText: "Rookie",
          badgeStatus: "completed",
          image: "https://i.ibb.co/0rW958L/cheers-2.png",
        },
      ],
      imgWidth: "100%",
    };
    const component = render(<OrganismBadgeCard {...props} />);
    expect(component).toBeTruthy();
  });

  it("Rendered component with img height", () => {
    const props: IBadgeCardProps = {
      img: "image.png",
      imgAlt: "Logo",
      badges: [
        {
          badgeText: "Rookie",
          badgeStatus: "completed",
          image: "https://i.ibb.co/0rW958L/cheers-2.png",
        },
      ],
      imgHeight: "100%",
    };
    const component = render(<OrganismBadgeCard {...props} />);
    expect(component).toBeTruthy();
  });
});
