// @flow
import React from 'react';
import { renderSnapshot } from '../../../../utils/tests';

import type { ToggleArrowsProps } from './toggle-arrows.proptypes';
import { ToggleArrows } from './index';

const DEFAULT_PROPS: ToggleArrowsProps = {
  disabled: false,
  useCurrentColor: false,
};

describe('ToggleArrows', () => {
  describe('snapshot', () => {
    it('is disabled', () => {
      const toggleArrows = renderSnapshot(
        <ToggleArrows {...DEFAULT_PROPS} disabled />,
      );
      expect(toggleArrows).toMatchSnapshot();
    });

    it('is not disabled', () => {
      const toggleArrows = renderSnapshot(
        <ToggleArrows {...DEFAULT_PROPS} disabled={false} />,
      );
      expect(toggleArrows).toMatchSnapshot();
    });

    it('does not use currentColor', () => {
      const toggleArrows = renderSnapshot(
        <ToggleArrows {...DEFAULT_PROPS} useCurrentColor={false} />,
      );
      expect(toggleArrows).toMatchSnapshot();
    });

    it('uses currentColor', () => {
      const toggleArrows = renderSnapshot(
        <ToggleArrows {...DEFAULT_PROPS} useCurrentColor />,
      );
      expect(toggleArrows).toMatchSnapshot();
    });
  });
});
