refactor: Use Modals from Antd instead of react-bootstrap (#11330)

* Refactor ModalTrigger to use antd modal

* Refactor a few components

* dynamic width

* Fix unit tests

* Use i18n for button text
This commit is contained in:
Kamil Gabryjelski
2020-10-26 19:20:10 +01:00
committed by GitHub
parent 144b279aa2
commit 894ca3c09b
13 changed files with 94 additions and 53 deletions

View File

@@ -18,7 +18,7 @@
*/
import React from 'react';
import { mount } from 'enzyme';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import CssEditor from 'src/dashboard/components/CssEditor';
describe('CssEditor', () => {
@@ -29,7 +29,12 @@ describe('CssEditor', () => {
expect(React.isValidElement(<CssEditor {...mockedProps} />)).toBe(true);
});
it('renders the trigger node', () => {
const wrapper = mount(<CssEditor {...mockedProps} />);
const wrapper = mount(<CssEditor {...mockedProps} />, {
wrappingComponent: ThemeProvider,
wrappingComponentProps: {
theme: supersetTheme,
},
});
expect(wrapper.find('.fa-edit')).toExist();
});
});