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