mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 07:09:55 +08:00
d57c86d92c
* feat: migrate less to token for time-picker * feat: add component-token demo * feat:update token with API Naming rules * feat: migrate less to token for Time-pikker * chore: code clean * chore: code clean * chore: udpate * feat: picker token * chore: add comment --------- Co-authored-by: MadCcc <1075746765@qq.com>
20 lines
683 B
TypeScript
20 lines
683 B
TypeScript
import dayjs from 'dayjs';
|
|
import * as React from 'react';
|
|
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
|
|
|
|
demoTest('date-picker', { skip: ['locale.tsx', 'component-token.tsx'], testRootProps: false });
|
|
|
|
rootPropsTest('date-picker', (DatePicker, props) => <DatePicker {...props} value={dayjs()} />, {
|
|
findRootElements: () => document.querySelectorAll('.ant-picker, .ant-picker-dropdown'),
|
|
expectCount: 2,
|
|
});
|
|
|
|
rootPropsTest(
|
|
'date-picker',
|
|
(DatePicker, props) => <DatePicker.RangePicker {...props} value={dayjs()} />,
|
|
{
|
|
findRootElements: () => document.querySelectorAll('.ant-picker-range, .ant-picker-dropdown'),
|
|
expectCount: 2,
|
|
},
|
|
);
|