import React from 'react';
import { render } from '~/testUtils/helpers';
import { CollapsableCard } from '..';

describe('<CollapsableCard />', () => {
  it('matches a snapshot for variant light', () => {
    const { container } = render(<CollapsableCard title="Title" />);

    expect(container.firstChild).toMatchSnapshot();
  });

  it('matches a snapshot for variant transparent', () => {
    const { container } = render(
      <CollapsableCard title="Title" variant="transparent" />
    );

    expect(container.firstChild).toMatchSnapshot();
  });

  it('matches a snapshot when defaultOpen is true', () => {
    const { container } = render(<CollapsableCard title="Title" defaultOpen />);

    expect(container.firstChild).toMatchSnapshot();
  });
});
