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