Sha256: a811bbb51160ecc63b005170419486f8cfd61f5cf6288e36b511f0f37052a69c

Contents?: true

Size: 853 Bytes

Versions: 10

Compression:

Stored size: 853 Bytes

Contents

import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import * as hooks from 'foremanReact/components/PF4/TableIndexPage/Table/TableHooks';
import ModuleStreamsPage from '../ModuleStreamsPage';
import GenericContentPage from '../../../components/Content/GenericContentPage';

describe('Module streams page', () => {
  it('should render and contain appropiate components', async () => {
    const moduleStreams = {};
    jest.spyOn(hooks, 'useUrlParams').mockImplementation(() => ({
      searchParam: '',
    }));
    const getModuleStreams = () => {};

    const wrapper = shallow(<ModuleStreamsPage
      moduleStreams={moduleStreams}
      getModuleStreams={getModuleStreams}
    />);

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js
katello-4.15.0.rc1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js
katello-4.14.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js
katello-4.14.0 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js
katello-4.14.0.rc3 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js
katello-4.14.0.rc2 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js
katello-4.14.0.rc1.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js
katello-4.14.0.rc1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js
katello-4.13.1 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js
katello-4.13.0 webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js