/*
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 * as React from 'react';
import { shallow } from 'enzyme';
import { StyledRoot } from '../index.js';
describe('ButtonGroup styled components', function () {
  var styledComponents = [[StyledRoot, 'StyledRoot']];
  test.each(styledComponents)('default styled', function (Component, name) {
    var component = shallow(React.createElement(Component, null));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected default styles"));
  });
  test.each(styledComponents)('first', function (Component, name) {
    var component = shallow(React.createElement(Component, {
      $first: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected styles when first element in group"));
  });
  test.each(styledComponents)('last', function (Component, name) {
    var component = shallow(React.createElement(Component, {
      $last: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected styles when last element in group"));
  });
});