"use strict";

var _react = _interopRequireDefault(require("react"));

var _enzyme = require("enzyme");

var _index = require("../index.js");

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

/*
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.
*/
describe('Component', function () {
  test('basic render', function () {
    var onSelect = jest.fn();
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.Unstable_Calendar, {
      onSelect: onSelect
    }));
    expect(wrapper.find(_index.StyledRoot).first()).toExist();
    expect(wrapper.find(_index.StyledMonth).first()).toExist();
    expect(wrapper.find(_index.StyledWeek).first()).toExist();
    expect(wrapper.find(_index.StyledDay).first()).toExist();
  });
  test('should not display quick select if isRange is false', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.Unstable_Calendar, {
      enableQuickSelect: true
    }));
    expect(wrapper.find(_index.StyledQuickSelectContainer).first()).not.toExist();
  });
  test('should display quick select if isRange and enableQuickSelect is true', function () {
    var wrapper = (0, _enzyme.mount)(_react.default.createElement(_index.Unstable_Calendar, {
      isRange: true,
      enableQuickSelect: true
    }));
    expect(wrapper.find(_index.StyledQuickSelectContainer).first()).toExist();
  });
});