Sha256: f160bc42f13e5374f9f6796387b5f4e79ed0449b7e5b6c1419dbeda612ce779b
Contents?: true
Size: 870 Bytes
Versions: 7
Compression:
Stored size: 870 Bytes
Contents
import React from 'react'; import { mount } from '@theforeman/test'; import { DescriptionField } from '../DescriptionField'; describe('DescriptionField', () => { it('rendring', () => { const component = mount( <DescriptionField inputs={[{ name: 'command' }]} value="Run %{command}" setValue={jest.fn()} /> ); const preview = component.find('#description-preview').hostNodes(); const findLink = () => component.find('.pf-m-link.pf-m-inline'); expect(findLink().text()).toEqual('Edit job description template'); expect(preview.props().value).toEqual('Run command'); findLink().simulate('click'); const description = component.find('#description').hostNodes(); expect(description.props().value).toEqual('Run %{command}'); expect(findLink().text()).toEqual('Preview job description'); }); });
Version data entries
7 entries across 7 versions & 1 rubygems