2022-06-22 14:57:09 +08:00
|
|
|
import React from 'react';
|
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';
|
2022-08-18 17:40:47 +08:00
|
|
|
import { render, resetMockDate, setMockDate } from '../../../tests/utils';
|
2017-11-30 09:54:31 +08:00
|
|
|
|
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', () => {
|
2022-08-18 17:40:47 +08:00
|
|
|
const { container } = render(<WeekPicker style={{ width: 400 }} />);
|
|
|
|
expect(container.firstChild).toMatchSnapshot();
|
2018-03-29 18:03:14 +08:00
|
|
|
});
|
2017-11-30 09:54:31 +08:00
|
|
|
});
|