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

describe('SearchIcon', () => {
  describe('snapshot', () => {
    it('default colorName matches the previous snapshot', () => {
      const searchIcon = renderSnapshot(<SearchIcon />);
      expect(searchIcon).toMatchSnapshot();
    });

    it('custom colorName matches the previous snapshot', () => {
      const searchIcon = renderSnapshot(
        <SearchIcon colorName="brand-primary-base" />,
      );
      expect(searchIcon).toMatchSnapshot();
    });

    it('disabled state matches the previous snapshot', () => {
      const searchIcon = renderSnapshot(
        <SearchIcon colorName="brand-primary-base" disabled />,
      );
      expect(searchIcon).toMatchSnapshot();
    });
  });
});
