chore: Removes direct theme imports (#19368)

This commit is contained in:
Michael S. Molina
2022-03-29 10:15:07 -03:00
committed by GitHub
parent d304849b46
commit 816a2c3e1e
11 changed files with 42 additions and 36 deletions

View File

@@ -17,8 +17,8 @@
* under the License.
*/
import React from 'react';
import { shallow } from 'enzyme';
import { mount } from 'enzyme';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import RunQueryActionButton from 'src/SqlLab/components/RunQueryActionButton';
import Button from 'src/components/Button';
@@ -35,7 +35,10 @@ describe('RunQueryActionButton', () => {
};
beforeEach(() => {
wrapper = shallow(<RunQueryActionButton {...defaultProps} />);
wrapper = mount(<RunQueryActionButton {...defaultProps} />, {
wrappingComponent: ThemeProvider,
wrappingComponentProps: { theme: supersetTheme },
});
});
it('is a valid react element', () => {