mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
add test case for month picker
This commit is contained in:
parent
6643f30b74
commit
782881e3ca
@ -1,8 +1,21 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import moment from 'moment';
|
||||
import DatePicker from '..';
|
||||
import focusTest from '../../../tests/shared/focusTest';
|
||||
import { openPanel } from './utils';
|
||||
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
describe('MonthPicker', () => {
|
||||
focusTest(MonthPicker);
|
||||
|
||||
it('reset select item when popup close', () => {
|
||||
const wrapper = mount(
|
||||
<MonthPicker value={moment('2018-07-01')} />
|
||||
);
|
||||
openPanel(wrapper);
|
||||
wrapper.find('.ant-calendar-month-panel-month').first().simulate('click');
|
||||
wrapper.find('.ant-calendar-month-panel-cell').at(6).hasClass('ant-calendar-month-panel-selected-cell');
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user