import React from "react";
import { render } from "@testing-library/react";
import "@testing-library/jest-dom";
import { LogoProps } from "../LogoProps";
import Logo from "../Logo";

describe("Logo Component", () => {
  const props: LogoProps = {
    dataTestId: "test-id",
    className: "logo-class",
    alt: "logo-alt",
    src: "https://cdn.cookielaw.org/logos/1058e0b9-ee95-4d43-8292-3dae40ce5c3c/8696d0de-6fa6-41d3-bdf2-b0608ded0691/5b13e569-bc03-49a3-acae-42b5d4c0fbed/renault.png",
    width: "200px",
    height: "200px",
  };

  it("renders all props correctly", () => {
    render(<Logo {...props} />);
  });

  it("matches the snapshot", () => {
    const { asFragment } = render(<Logo {...props} />);
    expect(asFragment()).toMatchSnapshot();
  });
});
