import React from 'react'; import {shallow} from 'enzyme'; import DetailedError from 'app/components/errors/detailedError'; describe('DetailedError', function() { it('renders', function() { const wrapper = shallow( Message} /> ); expect(wrapper).toMatchSnapshot(); }); it('renders with "Retry" button', function() { const wrapper = shallow( {}} heading="Error heading" message={
Message
} /> ); expect(wrapper).toMatchSnapshot(); }); it('can hide support links', function() { const wrapper = shallow( {}} heading="Error heading" message={
Message
} /> ); expect(wrapper).toMatchSnapshot(); }); it('hides footer when no "Retry" and no support links', function() { const wrapper = shallow( Message} /> ); expect(wrapper).toMatchSnapshot(); }); });