/*
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 { StyledAvatar, StyledRoot } from '../index.js';
describe('Avatar styled components', function () {
  var styledComponents = [[StyledAvatar, 'StyledAvatar'], [StyledRoot, 'StyledRoot']];
  test.each(styledComponents)('default properties', function (Component, name) {
    var component = shallow(React.createElement(Component, null));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected default styles"));
  });
  test.each(styledComponents)('non-default size', function (Component, name) {
    var component = shallow(React.createElement(Component, {
      $size: "scale1200"
    }));
    expect(component.instance().getStyles()).toMatchSnapshot("".concat(name, " has expected styles with non-default size"));
  });
  it('StyledRoot failure state', function () {
    var component = shallow(React.createElement(StyledRoot, {
      $didImageFailToLoad: true
    }));
    expect(component.instance().getStyles()).toMatchSnapshot('StyledRoot has expected failure state styles');
  });
});