/*
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 { StyledRoot, StyledList, StyledItem, StyledDragHandle, StyledCloseHandle, StyledLabel } from '../index.js';
describe('Component styled components', function () {
  test('StyledRoot - basic render', function () {
    var component = shallow(React.createElement(StyledRoot, null));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledRoot has correct styles');
  });
  test('StyledList - basic render', function () {
    var component = shallow(React.createElement(StyledList, null));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledList has correct styles');
  });
  test('StyledList - dragging is active', function () {
    var component = shallow(React.createElement(StyledList, {
      $isDragged: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledList has correct styles when dragging is active');
  });
  test('StyledItem - basic render', function () {
    var component = shallow(React.createElement(StyledItem, null));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledItem has correct styles');
  });
  test('StyledItem - dragged', function () {
    var component = shallow(React.createElement(StyledItem, {
      $isDragged: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledItem has correct styles when being dragged');
  });
  test('StyledItem - selected', function () {
    var component = shallow(React.createElement(StyledItem, {
      $isSelected: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledItem has correct styles when being selected');
  });
  test('StyledDragHandle - basic render', function () {
    var component = shallow(React.createElement(StyledDragHandle, null));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledDragHandle has correct styles');
  });
  test('StyledCloseHandle - basic render', function () {
    var component = shallow(React.createElement(StyledCloseHandle, null));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledCloseHandle has correct styles');
  });
  test('StyledLabel - basic render', function () {
    var component = shallow(React.createElement(StyledLabel, null));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledLabel has correct styles');
  });
});