refactor: remove queryFields in QueryObject and update chart control configs (#12091)

* Clean up queryFields

* Clean up unused vars

* Bump chart plugins

* Bringing changes in #12147
This commit is contained in:
Jesse Yang
2020-12-22 17:10:19 -08:00
committed by GitHub
parent de61859e98
commit d2da25a621
19 changed files with 328 additions and 2544 deletions

View File

@@ -21,9 +21,7 @@ import { getChartControlPanelRegistry, t } from '@superset-ui/core';
import {
getControlConfig,
getControlState,
getFormDataFromControls,
applyMapStateToPropsToControl,
getAllControlsState,
findControlItem,
} from 'src/explore/controlUtils';
import {
@@ -198,18 +196,6 @@ describe('controlUtils', () => {
});
});
describe('queryFields', () => {
it('in formData', () => {
const controlsState = getAllControlsState('table', 'table', {}, {});
const formData = getFormDataFromControls(controlsState);
expect(formData.queryFields).toEqual({
all_columns: 'columns',
metric: 'metrics',
metrics: 'metrics',
});
});
});
describe('findControlItem', () => {
it('find control as a string', () => {
const controlItem = findControlItem(