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

describe("ScrollView Component", () => {
  const props: ScrollViewProps = {
    activeView: 1,
    arrows: true,
    automaticViewChange: true,
    automaticViewChangeInterval: 5000,
    children: <div>Content</div>,
    className: "custom-class",
    dir: "ltr",
    endless: false,
    pageable: true,
    pagerOverlay: "none",
    style: {}
  };

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

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