refer to default color scheme in colorpickercontrol instead of pointing to specific scheme (#6031)

This commit is contained in:
Krist Wongsuphasawat
2018-10-04 18:10:22 -07:00
committed by Chris Williams
parent df341ffd26
commit 8fe6f12622
3 changed files with 5 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ import { SketchPicker } from 'react-color';
import ColorPickerControl from
'../../../../src/explore/components/controls/ColorPickerControl';
import ControlHeader from '../../../../src/explore/components/ControlHeader';
import { registerScheme } from '../../../../src/modules/ColorSchemeManager';
const defaultProps = {
value: { },
@@ -17,6 +18,8 @@ describe('ColorPickerControl', () => {
let wrapper;
let inst;
beforeEach(() => {
registerScheme('test', ['red', 'green', 'blue'])
.setDefaultSchemeName('test');
wrapper = shallow(<ColorPickerControl {...defaultProps} />);
inst = wrapper.instance();
});