import { render } from 'enzyme/build';
import React from 'react';
import Thumbnails from './index';

const thumbnails = {
    dotMode: false,
    items: [
        {
            thumbnailImage: './src/frontSide.jpg',
            identifier: 'frontside',
        },
        {
            thumbnailImage: './src/frontSide.jpg',
            identifier: 'backside',
        },
        {
            thumbnailImage: './src/frontSide.jpg',
            identifier: 'leftside',
        },
        {
            thumbnailImage: './src/frontSide.jpg',
            identifier: 'rightside',
        },
    ],
};

const thumbnailsDotMode = {
    dotMode: true,
    items: [
        {
            identifier: 'frontside',
        },
        {
            identifier: 'backside',
        },
        {
            identifier: 'leftside',
        },
        {
            identifier: 'rightside',
        },
    ],
};

it('renders images correctly', () => {
    const tree = render(<Thumbnails thumbnails={thumbnails} />);
    expect(tree).toMatchSnapshot();
});

it('renders dots correctly', () => {
    const tree = render(<Thumbnails thumbnails={thumbnailsDotMode} />);
    expect(tree).toMatchSnapshot();
});
