-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NP] Remove ui/agg_types
dependencies and move paginated table to kibana_legacy
#60276
Changes from 18 commits
7eed77e
3e992c2
f880e2d
7abddc4
555e19e
d70fac3
94f8f84
f390d01
d4688bf
97f40f4
111d502
7a9b879
87bc3dc
bbd5256
1d0cb79
fc3c455
895c69b
b68ab0b
7c358a9
b258b21
79b7b88
937777f
57ea6fa
40c15a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,8 @@ import React from 'react'; | |
import { mount, shallow } from 'enzyme'; | ||
|
||
import { VisState } from 'src/legacy/core_plugins/visualizations/public'; | ||
import { IndexPattern } from 'src/plugins/data/public'; | ||
import { IndexPattern, IAggConfig, AggGroupNames } from 'src/plugins/data/public'; | ||
import { DefaultEditorAggParams, DefaultEditorAggParamsProps } from './agg_params'; | ||
import { IAggConfig, AggGroupNames } from '../legacy_imports'; | ||
|
||
const mockEditorConfig = { | ||
useNormalizedEsInterval: { hidden: false, fixedValue: false }, | ||
|
@@ -35,7 +34,6 @@ const mockEditorConfig = { | |
}, | ||
}; | ||
|
||
jest.mock('ui/new_platform'); | ||
jest.mock('./utils', () => ({ | ||
getEditorConfig: jest.fn(() => mockEditorConfig), | ||
})); | ||
|
@@ -70,6 +68,27 @@ jest.mock('./agg_select', () => ({ | |
jest.mock('./agg_param', () => ({ | ||
DefaultEditorAggParam: () => null, | ||
})); | ||
jest.mock('../../../../../plugins/kibana_react/public', () => ({ | ||
useKibana: () => ({ | ||
services: { | ||
data: { | ||
search: { | ||
aggs: { | ||
types: { | ||
getAll: () => [], | ||
}, | ||
}, | ||
__LEGACY: { | ||
aggTypeFieldFilters: { | ||
filter: () => [], | ||
}, | ||
}, | ||
}, | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit - It would probably make maintenance easier if you passed the mocks from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done. |
||
}, | ||
}), | ||
withKibana: (x: any) => x, | ||
})); | ||
|
||
describe('DefaultEditorAggParams component', () => { | ||
let setAggParamValue: jest.Mock; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no necessity to collect coverage from these folders (
agg_types
doesn't exist anymore,vis
contains only legacy mocka tests since the most of code was moved)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍