fix react 15 test

This commit is contained in:
jljsj 2019-07-12 16:01:44 +08:00
parent 786bde9ca1
commit b5632d6eef
3 changed files with 4 additions and 4 deletions

View File

@ -84,8 +84,8 @@ describe('Modal.confirm triggers callbacks correctly', () => {
it('shows animation when close', () => {
jest.useFakeTimers();
open();
$$('.ant-btn')[0].click();
expect($$('.ant-modal-confirm')).toHaveLength(1);
$$('.ant-btn')[0].click();
jest.runAllTimers();
expect($$('.ant-modal-confirm')).toHaveLength(0);
jest.useRealTimers();

View File

@ -165,7 +165,7 @@ export default function confirm(config: ModalFuncProps) {
}
function render(props: any) {
ReactDOM.render(<ConfirmDialog {...props} />, div);
ReactDOM.render(<ConfirmDialog {...props} getContainer={false}/>, div);
}
render(currentConfig);

View File

@ -63,8 +63,8 @@
"rc-cascader": "~0.17.4",
"rc-checkbox": "~2.1.6",
"rc-collapse": "~1.11.3",
"rc-dialog": "7.5.1",
"rc-drawer": "~2.0.0",
"rc-dialog": "~7.5.2",
"rc-drawer": "~2.0.1",
"rc-dropdown": "~2.4.1",
"rc-editor-mention": "^1.1.13",
"rc-form": "^2.4.5",