mirror of
https://github.com/apache/superset.git
synced 2026-04-07 10:31:50 +00:00
feat(native-filters): enable filter indicator and make datasource optional (#13148)
* refactor: continue decouple native filters * refactor(native-filters): decouple native filter parms from config modal * lint: fix TS errors * lint: fix TS errors * refactor: update filter badge * refactor: rename ant filters * test: fix tests * test: fix tests * refactor: remove 18 from dataset
This commit is contained in:
@@ -40,10 +40,25 @@ Object.defineProperty(window, 'matchMedia', {
|
||||
})),
|
||||
});
|
||||
|
||||
jest.mock('@superset-ui/core', () => ({
|
||||
// @ts-ignore
|
||||
...jest.requireActual('@superset-ui/core'),
|
||||
getChartMetadataRegistry: () => ({
|
||||
items: {
|
||||
filter_select: {
|
||||
value: {
|
||||
datasourceCount: 1,
|
||||
behaviors: ['NATIVE_FILTER'],
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
}));
|
||||
|
||||
describe('FiltersConfigModal', () => {
|
||||
const mockedProps = {
|
||||
isOpen: true,
|
||||
initialFilterId: 'DefaultFilterId',
|
||||
initialFilterId: 'DefaultsID',
|
||||
createNewOnOpen: true,
|
||||
onCancel: jest.fn(),
|
||||
save: jest.fn(),
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
*/
|
||||
export const nativeFiltersInfo = {
|
||||
filters: {
|
||||
DefaultID1: {
|
||||
id: 'DefaultID1',
|
||||
DefaultsID: {
|
||||
id: 'DefaultsID',
|
||||
name: 'test',
|
||||
type: 'text',
|
||||
type: 'filter_select',
|
||||
targets: [
|
||||
{
|
||||
datasetId: 0,
|
||||
|
||||
Reference in New Issue
Block a user