import * as React from "react";
import { render, renderIntoDocument, cleanup } from "react-testing-library";

import Scroller from "../components/Scroller";
import { getItems } from "./utils/scroller";
import "jest-styled-components";

beforeEach(cleanup);

describe("Scoller scrolls", () => {
    test("01 - Scroll Vertical is default", () => {
        const { getByTestId } = render(<Scroller>{getItems()}</Scroller>);
        const vertical = getByTestId("scroll");
        expect(vertical).not.toBeNull();
    });

    test("02 - Scroller matches snapshot", () => {
        const { container } = render(<Scroller>{getItems()}</Scroller>);
        expect(container).toMatchSnapshot();
    });
});
