import React from 'react';
import { shallow } from 'enzyme';
import { CircularProgress } from 'material-ui-next/Progress';
import { withStyles } from 'material-ui-next/styles';
import PropTypes from 'prop-types';
const style = {
buttonProgress: {
position: 'absolute',
top: '50%',
left: '50%',
marginTop: -12,
marginLeft: -12,
},
};
const Composer = ({
classes,
}) => (
);
Composer.propTypes = {
classes: PropTypes.object.isRequired,
};
const Composition = withStyles(style)(Composer);
describe('', () => {
it('should render a styled CircularProgress', () => {
const wrapper = shallow();
// Note the use of dive() because Composition is now wrapped by the withStyles higher order component.
expect(wrapper.dive().find(CircularProgress)).toHaveLength(1);
});
});