mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Migrating NVD3 Area's stacked_style config (#9454)
* Migrating NVD3 Area's stacked_style config * test mods * lint * nonsense change * undoing nonsense. Come on GitHub, WORK.
This commit is contained in:
@@ -57,6 +57,23 @@ describe('controlUtils', () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
name: 'stacked_style',
|
||||
config: {
|
||||
type: 'SelectControl',
|
||||
label: t('Stacked Style'),
|
||||
renderTrigger: true,
|
||||
choices: [
|
||||
['stack', 'stack'],
|
||||
['stream', 'stream'],
|
||||
['expand', 'expand'],
|
||||
],
|
||||
default: 'stack',
|
||||
description: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -148,10 +165,15 @@ describe('controlUtils', () => {
|
||||
});
|
||||
|
||||
it('removes missing/invalid choice', () => {
|
||||
let control = getControlState('stacked_style', 'area', state, 'stack');
|
||||
let control = getControlState(
|
||||
'stacked_style',
|
||||
'test-chart',
|
||||
state,
|
||||
'stack',
|
||||
);
|
||||
expect(control.value).toBe('stack');
|
||||
|
||||
control = getControlState('stacked_style', 'area', state, 'FOO');
|
||||
control = getControlState('stacked_style', 'test-chart', state, 'FOO');
|
||||
expect(control.value).toBe(null);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user