Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Jun 2, 2020
1 parent da75691 commit fbd22ce
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,21 @@ describe('filter manager utilities', () => {

expect(compareFilters([f1], [f2], COMPARE_ALL_OPTIONS)).toBeFalsy();
});

test('should compare index with index true', () => {
const f1 = {
$state: { store: FilterStateStore.GLOBAL_STATE },
...buildQueryFilter({ _type: { match: { query: 'apache', type: 'phrase' } } }, 'index', ''),
};
const f2 = {
$state: { store: FilterStateStore.GLOBAL_STATE },
...buildQueryFilter({ _type: { match: { query: 'apache', type: 'phrase' } } }, 'index', ''),
};

f2.meta.index = 'wassup';
f2.meta.index = 'dog';

expect(compareFilters([f1], [f2], { index: true })).toBeFalsy();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class FilterEditorUI extends Component<Props, State> {
)
) {
/**
* Don't render the index pattern index pattern selector if thre's just one \ zero index patterns
* Don't render the index pattern selector if there's just one \ zero index patterns
* and if the index pattern the filter was LOADED with is in the indexPatterns list.
**/

Expand Down

0 comments on commit fbd22ce

Please sign in to comment.