Sha256: e704a6a2f89ddc09be557700e49ef89e4155ef755c6fd9d54dcd111f529bb4b1

Contents?: true

Size: 833 Bytes

Versions: 8

Compression:

Stored size: 833 Bytes

Contents

import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import ModuleStreamsTable from '../ModuleStreamsTable';
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(<ModuleStreamsTable
      moduleStreams={moduleStreams}
      onPaginationChange={onPaginationChange}
    />);

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
katello-3.13.4 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.13.3 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.13.2 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.13.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.13.0 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.13.0.rc2.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.13.0.rc2 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js
katello-3.13.0.rc1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js