"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.
*/
var styledComponents = [[_index.StyledRoot, 'StyledRoot'], [_index.StyledTabBar, 'StyledTabBar'], [_index.StyledTabContent, 'StyledTabContent'], [_index.StyledTab, 'StyledTab']];
describe.each(Object.values(_index.ORIENTATION))('Tabs styled components in %s orientation', function (orientation) {
  test.each(styledComponents)('Basic render', function (Component, name) {
    var component = (0, _enzyme.shallow)(_react.default.createElement(Component, {
      $orientation: orientation
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has correct styles in ").concat(orientation, " orientation"));
  });
  test.each(styledComponents)('Basic render when disabled', function (Component, name) {
    var component = (0, _enzyme.shallow)(_react.default.createElement(Component, {
      $orientation: orientation,
      $disabled: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has correct styles when disabled is set to true in ").concat(orientation, " orientation"));
  });
  test.each([[_index.StyledTab, 'StyledTab'], [_index.StyledTabContent, 'StyledTabContent']])('Basic render when active is set to true', function (Component, name) {
    var component = (0, _enzyme.shallow)(_react.default.createElement(Component, {
      $orientation: orientation,
      $active: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has correct styles when active is set to true in ").concat(orientation, " orientation"));
  });
});