Sha256: 6a3ca6e14b0b5fd6f910976ed67ea3a946203cf8bfee656db870229d2bc7bfd6
Contents?: true
Size: 943 Bytes
Versions: 56
Compression:
Stored size: 943 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 '../../AnsibleCollections/AnsibleCollectionsTableSchema'; import { Table } from '../../../components/pf3Table'; jest.mock('foremanReact/components/Pagination/PaginationWrapper', () => (<div>Pagination Mock</div>)); describe('Ansible Collections table', () => { it('should render and contain appropiate components', async () => { const ansibleCollections = { loading: false, results: [], pagination: {}, itemCount: 0, }; const onPaginationChange = () => {}; const wrapper = shallow(<ContentTable content={ansibleCollections} tableSchema={TableSchema} onPaginationChange={onPaginationChange} />); expect(toJson(wrapper)).toMatchSnapshot(); expect(wrapper.find(Table)).toHaveLength(1); }); });
Version data entries
56 entries across 56 versions & 1 rubygems