2023-05-06 15:49:37 +08:00
|
|
|
import * as React from 'react';
|
2023-12-21 10:30:08 +08:00
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
2023-01-20 11:03:50 +08:00
|
|
|
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
|
|
|
|
|
2023-08-22 16:28:20 +08:00
|
|
|
demoTest('date-picker', { skip: ['locale.tsx', 'component-token.tsx'], testRootProps: false });
|
2023-01-20 11:03:50 +08:00
|
|
|
|
2023-08-07 18:05:34 +08:00
|
|
|
rootPropsTest('date-picker', (DatePicker, props) => <DatePicker {...props} value={dayjs()} />, {
|
2023-01-20 11:03:50 +08:00
|
|
|
findRootElements: () => document.querySelectorAll('.ant-picker, .ant-picker-dropdown'),
|
|
|
|
expectCount: 2,
|
|
|
|
});
|
2023-08-07 18:05:34 +08:00
|
|
|
|
|
|
|
rootPropsTest(
|
2023-12-21 10:30:08 +08:00
|
|
|
['date-picker', 'RangePicker'],
|
2023-08-07 18:05:34 +08:00
|
|
|
(DatePicker, props) => <DatePicker.RangePicker {...props} value={dayjs()} />,
|
|
|
|
{
|
|
|
|
findRootElements: () => document.querySelectorAll('.ant-picker-range, .ant-picker-dropdown'),
|
|
|
|
expectCount: 2,
|
|
|
|
},
|
|
|
|
);
|