12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import React from 'react';
- import {shallow} from 'enzyme';
- import ResolutionBox from 'app/components/resolutionBox';
- describe('ResolutionBox', function() {
- describe('render()', function() {
- it('handles inNextRelease', function() {
- let wrapper = shallow(
- <ResolutionBox
- statusDetails={{inNextRelease: true}}
- params={{orgId: 'org', projectId: 'project'}}
- />
- );
- expect(wrapper).toMatchSnapshot();
- });
- it('handles inNextRelease with actor', function() {
- let wrapper = shallow(
- <ResolutionBox
- statusDetails={{
- inNextRelease: true,
- actor: {id: '111', name: 'David Cramer', email: 'david@sentry.io'},
- }}
- params={{orgId: 'org', projectId: 'project'}}
- />
- );
- expect(wrapper).toMatchSnapshot();
- });
- it('handles inRelease', function() {
- let wrapper = shallow(
- <ResolutionBox
- statusDetails={{
- inRelease: '1.0',
- }}
- params={{orgId: 'org', projectId: 'project'}}
- />
- );
- expect(wrapper).toMatchSnapshot();
- });
- it('handles inRelease with actor', function() {
- let wrapper = shallow(
- <ResolutionBox
- statusDetails={{
- inRelease: '1.0',
- actor: {id: '111', name: 'David Cramer', email: 'david@sentry.io'},
- }}
- params={{orgId: 'org', projectId: 'project'}}
- />
- );
- expect(wrapper).toMatchSnapshot();
- });
- it('handles default', function() {
- let wrapper = shallow(
- <ResolutionBox statusDetails={{}} params={{orgId: 'org', projectId: 'project'}} />
- );
- expect(wrapper).toMatchSnapshot();
- });
- it('handles inCommit', function() {
- let wrapper = shallow(
- <ResolutionBox
- statusDetails={{
- inCommit: TestStubs.Commit(),
- }}
- params={{orgId: 'org', projectId: 'project'}}
- />
- );
- expect(wrapper).toMatchSnapshot();
- });
- });
- });
|