123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import {Commit} from 'fixtures/js-stubs/commit';
- import {render} from 'sentry-test/reactTestingLibrary';
- import ResolutionBox from 'sentry/components/resolutionBox';
- describe('ResolutionBox', function () {
- describe('render()', function () {
- it('handles inNextRelease', function () {
- const {container} = render(
- <ResolutionBox statusDetails={{inNextRelease: true}} projectId="1" />
- );
- expect(container).toSnapshot();
- });
- it('handles inNextRelease with actor', function () {
- const {container} = render(
- <ResolutionBox
- statusDetails={{
- inNextRelease: true,
- actor: {
- id: '111',
- name: 'David Cramer',
- username: 'dcramer',
- ip_address: '127.0.0.1',
- email: 'david@sentry.io',
- },
- }}
- projectId="1"
- />
- );
- expect(container).toSnapshot();
- });
- it('handles inRelease', function () {
- const {container} = render(
- <ResolutionBox
- statusDetails={{
- inRelease: '1.0',
- }}
- projectId="1"
- />
- );
- expect(container).toSnapshot();
- });
- it('handles inRelease with actor', function () {
- const {container} = render(
- <ResolutionBox
- statusDetails={{
- inRelease: '1.0',
- actor: {
- id: '111',
- name: 'David Cramer',
- username: 'dcramer',
- ip_address: '127.0.0.1',
- email: 'david@sentry.io',
- },
- }}
- projectId="1"
- />
- );
- expect(container).toSnapshot();
- });
- it('handles default', function () {
- const {container} = render(<ResolutionBox statusDetails={{}} projectId="1" />);
- expect(container).toSnapshot();
- });
- it('handles inCommit', function () {
- const {container} = render(
- <ResolutionBox
- statusDetails={{
- inCommit: Commit(),
- }}
- projectId="1"
- />
- );
- expect(container).toSnapshot();
- });
- });
- });
|