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-4.0.2 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.1.2 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.18.4 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.1.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.1.0 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.0.1.2 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.18.3.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.1.0.rc2.2 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.1.0.rc2.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.0.1.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.18.3 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.1.0.rc2 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.0.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.1.0.rc1.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.1.0.rc1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.0.0 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.0.0.rc3.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-4.0.0.rc3 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.18.2.1 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js
katello-3.18.2 webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js