Skip to content

Commit

Permalink
fix jest
Browse files Browse the repository at this point in the history
  • Loading branch information
nlatipov committed Apr 14, 2022
1 parent 5089f48 commit 85c1529
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Kuery operator suggestions', () => {

beforeEach(() => {
querySuggestionsArgs = {
dataViews: [dataViewResponse],
indexPatterns: [dataViewResponse],
} as unknown as QuerySuggestionGetFnArgs;

getSuggestions = setupGetOperatorSuggestions(coreMock.createSetup());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('Kuery value suggestions', () => {
});
getSuggestions = setupGetValueSuggestions(coreSetup);
querySuggestionsArgs = {
dataViews: [dataViewResponse],
indexPatterns: [dataViewResponse],
} as unknown as QuerySuggestionGetFnArgs;

jest.clearAllMocks();
Expand Down
14 changes: 7 additions & 7 deletions src/plugins/unified_search/public/search_bar/search_bar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('SearchBar', () => {
it('Should render query bar when no options provided (in reality - timepicker)', () => {
const component = mount(
wrapSearchBarInContext({
dataViews: [mockDataView],
indexPatterns: [mockDataView],
})
);

Expand All @@ -126,7 +126,7 @@ describe('SearchBar', () => {
it('Should render empty when timepicker is off and no options provided', () => {
const component = mount(
wrapSearchBarInContext({
dataViews: [mockDataView],
indexPatterns: [mockDataView],
showDatePicker: false,
})
);
Expand All @@ -139,7 +139,7 @@ describe('SearchBar', () => {
it('Should render filter bar, when required fields are provided', () => {
const component = mount(
wrapSearchBarInContext({
dataViews: [mockDataView],
indexPatterns: [mockDataView],
showDatePicker: false,
onFiltersUpdated: noop,
filters: [],
Expand All @@ -154,7 +154,7 @@ describe('SearchBar', () => {
it('Should NOT render filter bar, if disabled', () => {
const component = mount(
wrapSearchBarInContext({
dataViews: [mockDataView],
indexPatterns: [mockDataView],
showFilterBar: false,
filters: [],
onFiltersUpdated: noop,
Expand All @@ -170,7 +170,7 @@ describe('SearchBar', () => {
it('Should render query bar, when required fields are provided', () => {
const component = mount(
wrapSearchBarInContext({
dataViews: [mockDataView],
indexPatterns: [mockDataView],
screenTitle: 'test screen',
onQuerySubmit: noop,
query: kqlQuery,
Expand All @@ -185,7 +185,7 @@ describe('SearchBar', () => {
it('Should NOT render query bar, if disabled', () => {
const component = mount(
wrapSearchBarInContext({
dataViews: [mockDataView],
indexPatterns: [mockDataView],
screenTitle: 'test screen',
onQuerySubmit: noop,
query: kqlQuery,
Expand All @@ -201,7 +201,7 @@ describe('SearchBar', () => {
it('Should render query bar and filter bar', () => {
const component = mount(
wrapSearchBarInContext({
dataViews: [mockDataView],
indexPatterns: [mockDataView],
screenTitle: 'test screen',
onQuerySubmit: noop,
query: kqlQuery,
Expand Down

0 comments on commit 85c1529

Please sign in to comment.