Sha256: 309c8590385b8a9dd876bc3ae6a62b543c90eb5d8d7950bd02c80d88641f731b
Contents?: true
Size: 918 Bytes
Versions: 56
Compression:
Stored size: 918 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 '../../../components/pf3Table'; 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
56 entries across 56 versions & 1 rubygems