"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.StyledPanelContainer, 'StyledPanelContainer'], [_index.StyledHeader, 'StyledHeader'], [_index.StyledToggleIcon, 'StyledToggleIcon'], [_index.StyledContent, 'StyledContent']];
describe('Accordion styled components', function () {
  test.each(styledComponents)('Basic render', function (Component, name) {
    var component = (0, _enzyme.shallow)(_react.default.createElement(Component, {
      $disabled: false,
      $expanded: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has correct styles when expanded is set to true"));
  });
  test.each(styledComponents)('Basic render', function (Component, name) {
    var component = (0, _enzyme.shallow)(_react.default.createElement(Component, {
      $disabled: false,
      $expanded: false
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has correct styles when expanded is set to false"));
  });
  test.each(styledComponents)('Basic render', function (Component, name) {
    var component = (0, _enzyme.shallow)(_react.default.createElement(Component, {
      $disabled: true,
      $expanded: false
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has correct styles when not expanded and disabled is set to true"));
  });
  test.each(styledComponents)('Basic render', function (Component, name) {
    var component = (0, _enzyme.shallow)(_react.default.createElement(Component, {
      $disabled: true,
      $expanded: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has correct styles when expanded and disabled is set to true"));
  });
});