Fix test case

This commit is contained in:
afc163 2017-12-28 13:19:55 +08:00
parent 8fb285fce9
commit 67df1cd979

View File

@ -195,13 +195,19 @@ describe('Table.filter', () => {
filters,
}],
}));
jest.useFakeTimers();
const dropdownWrapper = mount(wrapper.find('Trigger').instance().getComponent());
dropdownWrapper.find('.ant-dropdown-menu-submenu-title').at(0).simulate('mouseEnter');
jest.runAllTimers();
dropdownWrapper.update();
dropdownWrapper.find('.ant-dropdown-menu-submenu-title').at(1).simulate('mouseEnter');
jest.runAllTimers();
dropdownWrapper.update();
dropdownWrapper.find('MenuItem').last().simulate('click');
dropdownWrapper.find('.confirm').simulate('click');
wrapper.update();
expect(renderedNames(wrapper)).toEqual(['Jack']);
jest.useRealTimers();
});
it('works with JSX in controlled mode', () => {