fix tests

This commit is contained in:
John Mitchell
2019-01-25 15:22:32 -05:00
parent 7de89f6486
commit 02d7006ea4
3 changed files with 23 additions and 27 deletions

View File

@@ -26,7 +26,9 @@ describe('<Lookup />', () => {
</I18nProvider>
);
expect(spy).not.toHaveBeenCalled();
wrapper.find('#search').simulate('click');
debugger;
const searchItem = wrapper.find('.pf-c-input-group__text#search');
searchItem.first().simulate('click');
expect(spy).toHaveBeenCalled();
});
test('calls "onChecked" when a user changes a checkbox', () => {
@@ -40,7 +42,9 @@ describe('<Lookup />', () => {
/>
</I18nProvider>
);
wrapper.find('#search').simulate('click');
debugger;
const searchItem = wrapper.find('.pf-c-input-group__text#search');
searchItem.first().simulate('click');
wrapper.find('input[type="checkbox"]').simulate('change');
expect(spy).toHaveBeenCalled();
});
@@ -56,7 +60,8 @@ describe('<Lookup />', () => {
/>
</I18nProvider>
);
wrapper.find('.awx-c-icon--remove').simulate('click');
const removeIcon = wrapper.find('.awx-c-icon--remove').first();
removeIcon.simulate('click');
expect(spy).toHaveBeenCalled();
});
test('"wrapTags" method properly handles data', () => {