Sha256: 8cb4bf62eb24a7b68877342505a112b32fe2f69cecbb312bdc6a0b76402527f4
Contents?: true
Size: 1.04 KB
Versions: 36
Compression:
Stored size: 1.04 KB
Contents
import React from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import { LoadingState } from '../../../components/LoadingState'; import { Table } from '../../../components/pf3Table'; import ContentTable from '../ContentTable'; describe('Content Table', () => { it('should render and contain appropriate components', async () => { const content = { loading: false, results: [ { dummy_content_id: 1, dummy_content_name: 'dummy_name_1', }, { dummy_content_id: 2, dummy_content_name: 'dummy_name_2', }, ], pagination: {}, itemCount: 2, }; const onPaginationChange = () => {}; const TableSchema = []; const wrapper = shallow(<ContentTable content={content} tableSchema={TableSchema} onPaginationChange={onPaginationChange} />); expect(toJson(wrapper)).toMatchSnapshot(); expect(wrapper.find(Table)).toHaveLength(1); expect(wrapper.find(LoadingState)).toHaveLength(1); }); });
Version data entries
36 entries across 36 versions & 1 rubygems