2019-01-12 03:33:27 +00:00
|
|
|
import { mount } from '@vue/test-utils';
|
|
|
|
import { asyncExpect } from '@/tests/utils';
|
|
|
|
import DatePicker from '..';
|
|
|
|
import focusTest from '../../../tests/shared/focusTest';
|
2018-06-09 05:14:14 +00:00
|
|
|
|
2019-01-12 03:33:27 +00:00
|
|
|
const { WeekPicker } = DatePicker;
|
2018-06-09 05:14:14 +00:00
|
|
|
|
2019-07-30 11:51:49 +00:00
|
|
|
describe('WeekPicker', () => {
|
2019-01-12 03:33:27 +00:00
|
|
|
focusTest(WeekPicker);
|
2018-06-09 05:14:14 +00:00
|
|
|
|
|
|
|
it('should support style prop', async () => {
|
2019-01-12 03:33:27 +00:00
|
|
|
const wrapper = mount(
|
|
|
|
{
|
|
|
|
render() {
|
|
|
|
return <WeekPicker style={{ width: '400px' }} />;
|
|
|
|
},
|
2018-06-09 05:14:14 +00:00
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
{ sync: false },
|
|
|
|
);
|
2018-06-09 05:14:14 +00:00
|
|
|
await asyncExpect(() => {
|
2019-01-12 03:33:27 +00:00
|
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|