mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
feat(viz): add query mode switch to table chart (#10113)
1, Replace table chart rendering from jquery.DataTables to react-table: apache-superset/superset-ui#623 2. Rearrange the control panel, replace GROUP BY and NOT GROUP BY with a "Query Mode" switch: apache-superset/superset-ui#609
This commit is contained in:
@@ -105,6 +105,8 @@ describe('controlUtils', () => {
|
||||
expanded: true,
|
||||
controlSetRows: [
|
||||
[
|
||||
'metric',
|
||||
'metrics',
|
||||
{
|
||||
name: 'all_columns',
|
||||
config: {
|
||||
@@ -213,7 +215,12 @@ describe('controlUtils', () => {
|
||||
expect(control.value).toBe('stack');
|
||||
|
||||
control = getControlState('stacked_style', 'test-chart', state, 'FOO');
|
||||
expect(control.value).toBe(null);
|
||||
expect(control.value).toBeNull();
|
||||
});
|
||||
|
||||
it('returns null for non-existent field', () => {
|
||||
const control = getControlState('NON_EXISTENT', 'table', state);
|
||||
expect(control).toBeNull();
|
||||
});
|
||||
|
||||
it('applies the default function for metrics', () => {
|
||||
@@ -254,7 +261,11 @@ describe('controlUtils', () => {
|
||||
it('in formData', () => {
|
||||
const controlsState = getAllControlsState('table', 'table', {}, {});
|
||||
const formData = getFormDataFromControls(controlsState);
|
||||
expect(formData.queryFields).toEqual({ all_columns: 'columns' });
|
||||
expect(formData.queryFields).toEqual({
|
||||
all_columns: 'columns',
|
||||
metric: 'metrics',
|
||||
metrics: 'metrics',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user