/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { shallow } from 'enzyme';
import { StyledFileDragAndDrop, StyledContentMessage, StyledErrorMessage, StyledRoot, StyledHiddenInput } from '../index.js';
describe('FileUploader styled components', function () {
  var styledComponents = [[StyledFileDragAndDrop, 'StyledFileDragAndDrop'], [StyledContentMessage, 'StyledContentMessage'], [StyledErrorMessage, 'StyledErrorMessage'], [StyledRoot, 'StyledRoot'], [StyledHiddenInput, 'StyledHiddenInput']];
  test.each(styledComponents)('default properties', function (Component, name) {
    var component = shallow(React.createElement(Component, null));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected default styles"));
  });
  test.each(styledComponents)('disabled', function (Component, name) {
    var component = shallow(React.createElement(Component, {
      $isDisabled: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected styles when disabled"));
  });
  test.each(styledComponents)('drag active', function (Component, name) {
    var component = shallow(React.createElement(Component, {
      $isDragActive: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected styles when drag active"));
  });
  test.each(styledComponents)('drag accept', function (Component, name) {
    var component = shallow(React.createElement(Component, {
      $isDragAccept: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected styles when drag accept"));
  });
  test.each(styledComponents)('drag reject', function (Component, name) {
    var component = shallow(React.createElement(Component, {
      $isDragReject: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected styles when drag reject"));
  });
  test.each(styledComponents)('focused', function (Component, name) {
    var component = shallow(React.createElement(Component, {
      $isFocused: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected styles when focused"));
  });
  test.each(styledComponents)('afterFileDrop', function (Component, name) {
    var component = shallow(React.createElement(Component, {
      $afterFileDrop: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected styles when after files are dropped"));
  });
});