Sha256: af4ee6b1416b5b6228323be478b236634d5cbf629810ff49d240ace44325e07d

Contents?: true

Size: 865 Bytes

Versions: 87

Compression:

Stored size: 865 Bytes

Contents

import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import { Table } from 'react-bootstrap';
import ContentDetailInfo from '../ContentDetailInfo';

jest.mock('foremanReact/components/Pagination/PaginationWrapper', () => (<div>Pagination Mock</div>));

describe('Content Details Info', () => {
  it('should render and contain appropriate components', async () => {
    const displayMap = new Map([
      ['dummy_name', 'Name'],
      ['dummy_details_field', 'Details Field'],
    ]);
    const detailInfo = {
      dummy_name: 'dummy name',
      dummy_details_field: 'dummy details',
    };

    const wrapper = shallow(<ContentDetailInfo
      contentDetails={detailInfo}
      displayMap={displayMap}
    />);

    expect(toJson(wrapper)).toMatchSnapshot();
    expect(wrapper.find(Table)).toHaveLength(1);
  });
});

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
katello-3.16.0 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc5.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc5 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc4.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.15.3.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.15.3 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc4 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc3.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.15.2 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc3 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc2.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc2 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.15.1.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc1.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.15.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.16.0.rc1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.15.0.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.15.0 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.15.0.rc2 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.15.0.rc1.3 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js