diff --git a/components/_util/motion.tsx b/components/_util/motion.tsx
index f9c5a7f431..1c58df584e 100644
--- a/components/_util/motion.tsx
+++ b/components/_util/motion.tsx
@@ -1,5 +1,4 @@
-import { CSSMotionProps } from 'rc-motion';
-import { MotionEventHandler, MotionEndEventHandler } from 'rc-motion/lib/CSSMotion';
+import { CSSMotionProps, MotionEventHandler, MotionEndEventHandler } from 'rc-motion';
// ================== Collapse Motion ==================
const getCollapsedHeight: MotionEventHandler = () => ({ height: 0, opacity: 0 });
diff --git a/components/button/__tests__/__snapshots__/type.test.tsx.snap b/components/button/__tests__/__snapshots__/type.test.tsx.snap
index 0fb8c86a6d..b3836621c7 100644
--- a/components/button/__tests__/__snapshots__/type.test.tsx.snap
+++ b/components/button/__tests__/__snapshots__/type.test.tsx.snap
@@ -291,54 +291,10 @@ exports[`Button should not render as link button when href is undefined 1`] = `
`;
exports[`Button should render empty button without errors 1`] = `
-
-
-
-
-
-
-
-
-
-
-
+
`;
exports[`Button should support link button 1`] = `
diff --git a/components/button/__tests__/type.test.tsx b/components/button/__tests__/type.test.tsx
index d7d1d676be..2daa119c54 100644
--- a/components/button/__tests__/type.test.tsx
+++ b/components/button/__tests__/type.test.tsx
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { mount, render } from 'enzyme';
import { act } from 'react-dom/test-utils';
import { SearchOutlined } from '@ant-design/icons';
-import { resetWarned } from 'rc-util/lib/warning'
+import { resetWarned } from 'rc-util/lib/warning';
import Button from '..';
import ConfigProvider from '../../config-provider';
import mountTest from '../../../tests/shared/mountTest';
@@ -111,7 +111,7 @@ describe('Button', () => {
{undefined}
,
);
- expect(wrapper).toMatchSnapshot();
+ expect(wrapper.render()).toMatchSnapshot();
});
it('have static property for type detecting', () => {
@@ -282,7 +282,7 @@ describe('Button', () => {
});
it('should warning when pass a string as icon props', () => {
- resetWarned()
+ resetWarned();
const warnSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
mount( );
expect(warnSpy).not.toHaveBeenCalled();
@@ -294,24 +294,24 @@ describe('Button', () => {
});
it('should warning when pass type=link and ghost=true', () => {
- resetWarned()
+ resetWarned();
const warnSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
mount( );
expect(warnSpy).toHaveBeenCalledWith(
"Warning: [antd: Button] `link` or `text` button can't be a `ghost` button.",
);
warnSpy.mockRestore();
- })
-
+ });
+
it('should warning when pass type=text and ghost=true', () => {
- resetWarned()
+ resetWarned();
const warnSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
mount( );
expect(warnSpy).toHaveBeenCalledWith(
"Warning: [antd: Button] `link` or `text` button can't be a `ghost` button.",
);
warnSpy.mockRestore();
- })
+ });
it('skip check 2 words when ConfigProvider disable this', () => {
const wrapper = mount(
diff --git a/components/cascader/__tests__/__snapshots__/index.test.js.snap b/components/cascader/__tests__/__snapshots__/index.test.js.snap
index 0883343fe1..ae71753306 100644
--- a/components/cascader/__tests__/__snapshots__/index.test.js.snap
+++ b/components/cascader/__tests__/__snapshots__/index.test.js.snap
@@ -1042,402 +1042,40 @@ exports[`Cascader rtl render component should be rendered correctly in RTL direc
`;
exports[`Cascader should highlight keyword and filter when search in Cascader 1`] = `
-
-
-
-
+
-
+
`;
exports[`Cascader should highlight keyword and filter when search in Cascader with same field name of label and value 1`] = `
@@ -1484,632 +1122,140 @@ exports[`Cascader should highlight keyword and filter when search in Cascader wi
`;
exports[`Cascader should render not found content 1`] = `
-
-
-
-
+
-
+
`;
exports[`Cascader should show not found content when options.length is 0 1`] = `
-
-
-
-
+
-
+
`;
exports[`Cascader support controlled mode 1`] = `
diff --git a/components/cascader/__tests__/index.test.js b/components/cascader/__tests__/index.test.js
index 73a7e6424f..50ba05cf98 100644
--- a/components/cascader/__tests__/index.test.js
+++ b/components/cascader/__tests__/index.test.js
@@ -134,7 +134,7 @@ describe('Cascader', () => {
wrapper.find('input').simulate('change', { target: { value: 'z' } });
expect(wrapper.state('inputValue')).toBe('z');
const popupWrapper = mount(wrapper.find('Trigger').instance().getComponent());
- expect(popupWrapper).toMatchSnapshot();
+ expect(popupWrapper.render()).toMatchSnapshot();
});
it('should highlight keyword and filter when search in Cascader with same field name of label and value', () => {
@@ -184,7 +184,7 @@ describe('Cascader', () => {
wrapper.find('input').simulate('change', { target: { value: '__notfoundkeyword__' } });
expect(wrapper.state('inputValue')).toBe('__notfoundkeyword__');
const popupWrapper = mount(wrapper.find('Trigger').instance().getComponent());
- expect(popupWrapper).toMatchSnapshot();
+ expect(popupWrapper.render()).toMatchSnapshot();
});
it('should support to clear selection', async () => {
@@ -318,7 +318,7 @@ describe('Cascader', () => {
const wrapper = mount( );
wrapper.find('input').simulate('click');
const popupWrapper = mount(wrapper.find('Trigger').instance().getComponent());
- expect(popupWrapper).toMatchSnapshot();
+ expect(popupWrapper.render()).toMatchSnapshot();
});
describe('limit filtered item count', () => {
diff --git a/package.json b/package.json
index d3527cd4d5..673321f03d 100644
--- a/package.json
+++ b/package.json
@@ -129,7 +129,7 @@
"rc-input-number": "~6.0.0",
"rc-mentions": "~1.4.0",
"rc-menu": "~8.5.2",
- "rc-motion": "^1.0.0",
+ "rc-motion": "^1.1.1",
"rc-notification": "~4.4.0",
"rc-pagination": "~3.0.3",
"rc-picker": "~2.0.6",