fix: Visualization settings were lost when editing a datasource from Explore (#10092)

This commit is contained in:
Will Barrett
2020-06-19 12:55:49 -07:00
committed by GitHub
parent 2e76fbb7e5
commit 961b55cfba
2 changed files with 4 additions and 6 deletions

View File

@@ -28,6 +28,7 @@ describe('reducers', () => {
actions.setControlValue('x_axis_label', 'x', []),
);
expect(newState.controls.x_axis_label.value).toBe('x');
expect(newState.form_data.x_axis_label).toBe('x');
});
it('setControlValue works as expected with a checkbox', () => {
const newState = exploreReducer(
@@ -35,5 +36,6 @@ describe('reducers', () => {
actions.setControlValue('show_legend', true, []),
);
expect(newState.controls.show_legend.value).toBe(true);
expect(newState.form_data.show_legend).toBe(true);
});
});