|
|
@ -1,6 +1,7 @@ |
|
|
|
import React from 'react'; |
|
|
|
import ConfigProvider from '..'; |
|
|
|
import { render } from '../../../tests/utils'; |
|
|
|
import Descriptions from '../../descriptions'; |
|
|
|
import Divider from '../../divider'; |
|
|
|
import Space from '../../space'; |
|
|
|
|
|
|
@ -107,4 +108,24 @@ describe('ConfigProvider support style and className props', () => { |
|
|
|
); |
|
|
|
expect(container.querySelector('.ant-divider'))?.toHaveStyle({ color: 'red', height: '80px' }); |
|
|
|
}); |
|
|
|
|
|
|
|
it('Should Radio className & style works', () => { |
|
|
|
const { container } = render( |
|
|
|
<ConfigProvider |
|
|
|
descriptions={{ |
|
|
|
className: 'config-provider-className', |
|
|
|
style: { |
|
|
|
background: 'red', |
|
|
|
}, |
|
|
|
}} |
|
|
|
> |
|
|
|
<Descriptions title="User Info"> |
|
|
|
<Descriptions.Item label="UserName">muxin</Descriptions.Item> |
|
|
|
</Descriptions> |
|
|
|
</ConfigProvider>, |
|
|
|
); |
|
|
|
|
|
|
|
expect(container.querySelector('.ant-descriptions')).toHaveClass('config-provider-className'); |
|
|
|
expect(container.querySelector('.ant-descriptions')).toHaveStyle({ background: 'red' }); |
|
|
|
}); |
|
|
|
}); |
|
|
|