mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
add unit test coverage for AnsibleSelect.jsx
This commit is contained in:
parent
bbd94fa4f7
commit
48e1fbfb38
@ -29,4 +29,16 @@ describe('<AnsibleSelect />', () => {
|
||||
wrapper.find('select').simulate('change');
|
||||
expect(spy).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
test('content not rendered when data property is falsey', () => {
|
||||
const wrapper = mount(
|
||||
<AnsibleSelect
|
||||
selected="foo"
|
||||
selectChange={() => { }}
|
||||
labelName={label}
|
||||
data={null}
|
||||
/>
|
||||
);
|
||||
expect(wrapper.find('FormGroup')).toHaveLength(0);
|
||||
expect(wrapper.find('Select')).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user