Sha256: 00a55621e30ae0913359e8ba6e7b49d00b55e3e09b87c72baf7f3b3fd3115fc1
Contents?: true
Size: 756 Bytes
Versions: 107
Compression:
Stored size: 756 Bytes
Contents
import React from 'react'; import { mount, testComponentSnapshotsWithFixtures } from '@theforeman/test'; import NavContainer from '../NavContainer'; import { props } from '../NavContainer.fixtures'; const fixtures = { 'render without Props': {}, 'render with Props': props, }; describe('NavContainer', () => { describe('rendering', () => testComponentSnapshotsWithFixtures(NavContainer, fixtures)); it('click should call onTabClick prop', () => { const onTabClick = jest.fn(); const modifiedProps = { ...props, }; modifiedProps.items[0].onClick = onTabClick; const wrapper = mount(<NavContainer {...modifiedProps} />); wrapper.find('NavItem a').simulate('click'); expect(onTabClick).toBeCalled(); }); });
Version data entries
107 entries across 107 versions & 2 rubygems