2018-03-29 18:03:14 +08:00
|
|
|
import React from 'react';
|
2019-12-11 23:32:19 +08:00
|
|
|
import { mount } from 'enzyme';
|
2018-12-28 10:50:17 +08:00
|
|
|
import { setMockDate, resetMockDate } from '../../../tests/utils';
|
2018-01-13 19:11:53 +08:00
|
|
|
import DatePicker from '..';
|
2017-11-30 09:54:31 +08:00
|
|
|
import focusTest from '../../../tests/shared/focusTest';
|
|
|
|
|
2018-01-13 19:11:53 +08:00
|
|
|
const { WeekPicker } = DatePicker;
|
|
|
|
|
2017-11-30 09:54:31 +08:00
|
|
|
describe('WeekPicker', () => {
|
2018-12-28 10:50:17 +08:00
|
|
|
beforeEach(() => {
|
|
|
|
setMockDate();
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(() => {
|
|
|
|
resetMockDate();
|
|
|
|
});
|
|
|
|
|
2020-04-22 15:58:57 +08:00
|
|
|
focusTest(WeekPicker, { refFocus: true });
|
2018-03-29 18:03:14 +08:00
|
|
|
|
|
|
|
it('should support style prop', () => {
|
2018-12-07 20:02:01 +08:00
|
|
|
const wrapper = mount(<WeekPicker style={{ width: 400 }} />);
|
2018-03-29 18:03:14 +08:00
|
|
|
expect(wrapper.render()).toMatchSnapshot();
|
|
|
|
});
|
2017-11-30 09:54:31 +08:00
|
|
|
});
|