Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ describe('DiscoverFieldSearch', () => {
expect(badge.text()).toEqual('0');
});

test('missing switch appears with new fields api', () => {
const component = mountComponent({ ...defaultProps, useNewFieldsApi: true });
const btn = findTestSubject(component, 'toggleFieldFilterButton');
btn.simulate('click');
expect(findTestSubject(component, 'missingSwitch').exists()).toBeTruthy();
});

test('change in filters triggers onChange', () => {
const onChange = jest.fn();
const component = mountComponent({ ...defaultProps, ...{ onChange } });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ export function DiscoverFieldSearch({ onChange, value, types, useNewFieldsApi }:
};

const footer = () => {
if (useNewFieldsApi) {
return null;
}
return (
<EuiPopoverFooter>
<EuiSwitch
Expand Down