mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
Fix linter errors and add test to AnsibleSelect component.
This commit is contained in:
@@ -41,4 +41,16 @@ describe('<AnsibleSelect />', () => {
|
||||
expect(wrapper.find('FormGroup')).toHaveLength(0);
|
||||
expect(wrapper.find('Select')).toHaveLength(0);
|
||||
});
|
||||
test('Returns correct select options if defaultSelected props is passed', () => {
|
||||
const wrapper = mount(
|
||||
<AnsibleSelect
|
||||
selected="foo"
|
||||
selectChange={() => { }}
|
||||
labelName={label}
|
||||
data={mockData}
|
||||
defaultSelected={mockData[1]}
|
||||
/>
|
||||
);
|
||||
expect(wrapper.find('Select')).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user