import React from 'react';
import renderer from 'react-test-renderer'; // eslint-disable-line import/no-extraneous-dependencies

import SelectInput from './index';

test('SelectInput renders correctly', () => {
  const tree = renderer.create(
    <div style={{ marginBottom: '100px' }}>
      <SelectInput
        label="Request Type"
        options={[
          { value: 'business', label: 'Business' },
          { value: 'information', label: 'Information' },
          { value: 'partnership', label: 'Partnership' },
          { value: 'samples', label: 'Samples' }
        ]}
        mandatory
        value="business"
        onChange={() => {}}
      />
      <SelectInput
        label="Request Type"
        options={[
          { value: 'business', label: 'Business' },
          { value: 'information', label: 'Information' }
        ]}
        disabledOptions={[
          { value: 'partnership', label: 'Partnership', hint: 'tooltip' },
          { value: 'samples', label: 'Samples', hint: 'tooltip' }
        ]}
        mandatory
        value="business"
        multiple
        onChange={() => {}}
        allowCreate
      />
    </div>
  ).toJSON();
  expect(tree).toMatchSnapshot();
});
