mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat: add deafult buildQuery for V1 chart data requests (#10048)
This commit is contained in:
@@ -19,7 +19,11 @@
|
||||
import sinon from 'sinon';
|
||||
|
||||
import URI from 'urijs';
|
||||
import { getExploreUrl, getExploreLongUrl } from 'src/explore/exploreUtils';
|
||||
import {
|
||||
buildV1ChartDataPayload,
|
||||
getExploreUrl,
|
||||
getExploreLongUrl,
|
||||
} from 'src/explore/exploreUtils';
|
||||
import * as hostNamesConfig from 'src/utils/hostNamesConfig';
|
||||
|
||||
describe('exploreUtils', () => {
|
||||
@@ -189,4 +193,13 @@ describe('exploreUtils', () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('buildV1ChartDataPayload', () => {
|
||||
it('generate valid request payload despite no registered buildQuery', () => {
|
||||
const v1RequestPayload = buildV1ChartDataPayload({
|
||||
formData: { ...formData, viz_type: 'my_custom_viz' },
|
||||
});
|
||||
expect(v1RequestPayload).hasOwnProperty('queries');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user