mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Upgrade to React==16.4.1 & Enzyme==3.3.0 (#5359)
* Bumping react==16.4.1 & enzyme==3.3.0 The upgrade was pretty smooth except for a cryptic message coming out of react-select around running multiple copies of React. It turns out the `common` bundle had React and was conflicting with explore and dashboard apps, only in 16.x. This somehow wasn't a problem in 15.x outside of the wasted resources. Running 16.4 should bring in all sorts of perf improvements and features we've all been waiting for. https://reactjs.org/blog/2017/09/26/react-v16.0.html TODO: react-bootstrap-datetimepicker isn't compatible with React 16 * Trying to deprecate react-bootstrap-datetime * Moving forward * Reintroducing tests
This commit is contained in:
committed by
GitHub
parent
e35bfba308
commit
73db918fbe
@@ -152,7 +152,6 @@ describe('Dashboard', () => {
|
||||
it('should call refresh if a filter is added', () => {
|
||||
const wrapper = setup({ dashboardState: overrideDashboardState });
|
||||
const refreshExceptSpy = sinon.spy(wrapper.instance(), 'refreshExcept');
|
||||
const prevProps = wrapper.instance().props;
|
||||
wrapper.setProps({
|
||||
dashboardState: {
|
||||
...overrideDashboardState,
|
||||
@@ -162,7 +161,6 @@ describe('Dashboard', () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
wrapper.instance().componentDidUpdate(prevProps);
|
||||
refreshExceptSpy.restore();
|
||||
expect(refreshExceptSpy.callCount).to.equal(1);
|
||||
});
|
||||
@@ -170,14 +168,12 @@ describe('Dashboard', () => {
|
||||
it('should call refresh if a filter is removed', () => {
|
||||
const wrapper = setup({ dashboardState: overrideDashboardState });
|
||||
const refreshExceptSpy = sinon.spy(wrapper.instance(), 'refreshExcept');
|
||||
const prevProps = wrapper.instance().props;
|
||||
wrapper.setProps({
|
||||
dashboardState: {
|
||||
...overrideDashboardState,
|
||||
filters: {},
|
||||
},
|
||||
});
|
||||
wrapper.instance().componentDidUpdate(prevProps);
|
||||
refreshExceptSpy.restore();
|
||||
expect(refreshExceptSpy.callCount).to.equal(1);
|
||||
});
|
||||
@@ -185,7 +181,6 @@ describe('Dashboard', () => {
|
||||
it('should call refresh if a filter is changed', () => {
|
||||
const wrapper = setup({ dashboardState: overrideDashboardState });
|
||||
const refreshExceptSpy = sinon.spy(wrapper.instance(), 'refreshExcept');
|
||||
const prevProps = wrapper.instance().props;
|
||||
wrapper.setProps({
|
||||
dashboardState: {
|
||||
...overrideDashboardState,
|
||||
@@ -195,7 +190,6 @@ describe('Dashboard', () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
wrapper.instance().componentDidUpdate(prevProps);
|
||||
refreshExceptSpy.restore();
|
||||
expect(refreshExceptSpy.callCount).to.equal(1);
|
||||
});
|
||||
@@ -203,7 +197,6 @@ describe('Dashboard', () => {
|
||||
it('should not call refresh if filters change and refresh is false', () => {
|
||||
const wrapper = setup({ dashboardState: overrideDashboardState });
|
||||
const refreshExceptSpy = sinon.spy(wrapper.instance(), 'refreshExcept');
|
||||
const prevProps = wrapper.instance().props;
|
||||
wrapper.setProps({
|
||||
dashboardState: {
|
||||
...overrideDashboardState,
|
||||
@@ -214,7 +207,6 @@ describe('Dashboard', () => {
|
||||
refresh: false,
|
||||
},
|
||||
});
|
||||
wrapper.instance().componentDidUpdate(prevProps);
|
||||
refreshExceptSpy.restore();
|
||||
expect(refreshExceptSpy.callCount).to.equal(0);
|
||||
});
|
||||
|
||||
@@ -113,9 +113,10 @@ describe('Markdown', () => {
|
||||
// the mode dropdown onchange instead
|
||||
const dropdown = wrapper.find(MarkdownModeDropdown);
|
||||
dropdown.prop('onChange')('preview');
|
||||
wrapper.update();
|
||||
|
||||
expect(wrapper.find(AceEditor)).to.have.length(0);
|
||||
expect(wrapper.find(ReactMarkdown)).to.have.length(1);
|
||||
expect(wrapper.find(AceEditor)).to.have.length(0);
|
||||
});
|
||||
|
||||
it('should call updateComponents when editMode changes from edit => preview, and there are markdownSource changes', () => {
|
||||
|
||||
Reference in New Issue
Block a user