style: fix checkbox color (#10970)

* style: fix checkbox color

* lint

* wrap test into theme
This commit is contained in:
Maxime Beauchemin
2020-09-21 13:12:12 -07:00
committed by GitHub
parent 41dfcd4834
commit e4e78b66fa
3 changed files with 18 additions and 6 deletions

View File

@@ -21,6 +21,8 @@ import React from 'react';
import sinon from 'sinon';
import { shallow, mount } from 'enzyme';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import CheckboxControl from 'src/explore/components/controls/CheckboxControl';
import ControlHeader from 'src/explore/components/ControlHeader';
import Checkbox from 'src/components/Checkbox';
@@ -48,7 +50,10 @@ describe('CheckboxControl', () => {
});
it('Checks the box when the label is clicked', () => {
const fullComponent = mount(<CheckboxControl {...defaultProps} />);
const fullComponent = mount(<CheckboxControl {...defaultProps} />, {
wrappingComponent: ThemeProvider,
wrappingComponentProps: { theme: supersetTheme },
});
const spy = sinon.spy(fullComponent.instance(), 'onChange');