'use strict';

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactTestRenderer = require('react-test-renderer');

var _reactTestRenderer2 = _interopRequireDefault(_reactTestRenderer);

var _index = require('./index');

var _index2 = _interopRequireDefault(_index);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// TODO: Remove mock when updating to React 15.4
// https://github.com/facebook/react/issues/7740
jest.mock('./Content', function () {
  return 'DropdownContent';
}); // eslint-disable-line import/no-extraneous-dependencies

test('Dropdown renders correctly', function () {
  var tree = _reactTestRenderer2.default.create(_react2.default.createElement(
    'div',
    null,
    _react2.default.createElement(
      _index2.default,
      { variant: 'primary', reverse: true, className: 'dc' },
      _react2.default.createElement(
        _index2.default.Trigger,
        { className: 'tc' },
        'Hello'
      ),
      _react2.default.createElement(
        _index2.default.Content,
        { maxItems: '2', className: 'cc' },
        _react2.default.createElement(
          _index2.default.Item,
          { className: 'ic' },
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          { onClick: alert },
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        )
      )
    ),
    _react2.default.createElement(
      _index2.default,
      { variant: 'info' },
      _react2.default.createElement(
        _index2.default.Trigger,
        null,
        'Hello'
      ),
      _react2.default.createElement(
        _index2.default.Content,
        { maxItems: '5' },
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        )
      )
    ),
    _react2.default.createElement(
      _index2.default,
      { variant: 'warning' },
      _react2.default.createElement(
        _index2.default.Trigger,
        null,
        'Hello'
      ),
      _react2.default.createElement(
        _index2.default.Content,
        { maxItems: '5' },
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        )
      )
    ),
    _react2.default.createElement(
      _index2.default,
      { variant: 'alert' },
      _react2.default.createElement(
        _index2.default.Trigger,
        null,
        'Hello'
      ),
      _react2.default.createElement(
        _index2.default.Content,
        { maxItems: '5' },
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        )
      )
    ),
    _react2.default.createElement(
      _index2.default,
      { variant: 'dash-lagoon' },
      _react2.default.createElement(
        _index2.default.Trigger,
        null,
        'Hello'
      ),
      _react2.default.createElement(
        _index2.default.Content,
        { maxItems: '5' },
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        ),
        _react2.default.createElement(
          _index2.default.Item,
          null,
          'hello hello hello hello'
        )
      )
    )
  )).toJSON();
  expect(tree).toMatchSnapshot();
});