import React from 'react';
import { render, cleanup } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';

import Row from '.';
import { getToplistItem } from '~tests/factories/modules/toplist.factory';

describe('Molecules/TopList/Row', () => {
  test('render with props', () => {
    const { container } = render(<Row item={getToplistItem()} tracker="main" />);
    expect(container).toBeTruthy();
    expect(container.querySelector('.row.list')).toBeTruthy();
    // expect(getByText('150 free spins')).toBeTruthy();
  });

  test('grid layout', () => {
    const { container } = render(<Row item={getToplistItem()} tracker="main" layout="grid" />);
    expect(container.querySelector('.row.grid')).toBeTruthy();
  });
});
afterEach(() => {
  cleanup();
});
