Sha256: bdefa45707dbbeb5a37da5b484f7bbe8631e7e3a73148c69457ecaf15839067a

Contents?: true

Size: 938 Bytes

Versions: 31

Compression:

Stored size: 938 Bytes

Contents

import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import ContentTable from '../../../components/Content/ContentTable';
import TableSchema from '../../ModuleStreams/ModuleStreamsTableSchema';
import { Table } from '../../../move_to_foreman/components/common/table';

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

describe('Module streams table', () => {
  it('should render and contain appropiate components', async () => {
    const moduleStreams = {
      loading: false, results: [], pagination: {}, itemCount: 0,
    };
    const onPaginationChange = () => {};

    const wrapper = shallow(<ContentTable
      content={moduleStreams}
      tableSchema={TableSchema}
      onPaginationChange={onPaginationChange}
    />);

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

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
katello-3.16.2 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.1.2 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.1.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc5.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc5 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc4.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.15.3.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.15.3 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc4 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc3.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.15.2 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc3 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc2.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc2 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.15.1.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc1.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.15.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.16.0.rc1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js