Sha256: 06b54ac67b5ea20dc881a62621c0b560ed8bccde47d480e0a1984348a459fc2f
Contents?: true
Size: 963 Bytes
Versions: 31
Compression:
Stored size: 963 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 '../../../move_to_foreman/components/common/table'; 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
31 entries across 31 versions & 1 rubygems