refactor: Replace react-bootstrap Modals with Antd in Explore (#11389)

* VizTypeControl

* SaveModal

* explore/PropertiesModal

* Fix e2e tests

* Remove console logs

* Fix tests

* Fix test

* Fix e2e test

* Remove unnecessary fragment

* Fix e2e tests

* Fix e2e test
This commit is contained in:
Kamil Gabryjelski
2020-11-02 08:04:53 +01:00
committed by GitHub
parent 854a4614a8
commit 19f2deb27f
7 changed files with 205 additions and 211 deletions

View File

@@ -23,11 +23,12 @@ import { bindActionCreators } from 'redux';
import { shallow } from 'enzyme';
import { styledMount as mount } from 'spec/helpers/theming';
import { FormControl, Modal, Radio } from 'react-bootstrap';
import { FormControl, Radio } from 'react-bootstrap';
import Button from 'src/components/Button';
import sinon from 'sinon';
import fetchMock from 'fetch-mock';
import Modal from 'src/common/components/Modal';
import * as exploreUtils from 'src/explore/exploreUtils';
import * as saveModalActions from 'src/explore/actions/saveModalActions';
import SaveModal from 'src/explore/components/SaveModal';
@@ -79,8 +80,10 @@ describe('SaveModal', () => {
const wrapper = getWrapper();
expect(wrapper.find(Modal)).toExist();
expect(wrapper.find(FormControl)).toExist();
expect(wrapper.find(Button)).toHaveLength(3);
expect(wrapper.find(Radio)).toHaveLength(2);
const footerWrapper = shallow(wrapper.find('Modal').props().footer);
expect(footerWrapper.find(Button)).toHaveLength(3);
});
it('overwrite radio button is disabled for new slice', () => {