|
|
@ -6,6 +6,7 @@ import Anchor from '../../anchor'; |
|
|
|
import Avatar from '../../avatar'; |
|
|
|
import Badge from '../../badge'; |
|
|
|
import Breadcrumb from '../../breadcrumb'; |
|
|
|
import Calendar from '../../calendar'; |
|
|
|
import Card from '../../card'; |
|
|
|
import Cascader from '../../cascader'; |
|
|
|
import Checkbox from '../../checkbox'; |
|
|
@ -778,6 +779,36 @@ describe('ConfigProvider support style and className props', () => { |
|
|
|
expect(element).toHaveStyle({ backgroundColor: 'blue' }); |
|
|
|
}); |
|
|
|
|
|
|
|
it('Should Calendar className works', () => { |
|
|
|
const { container } = render( |
|
|
|
<ConfigProvider |
|
|
|
calendar={{ |
|
|
|
className: 'test-class', |
|
|
|
}} |
|
|
|
> |
|
|
|
<Calendar /> |
|
|
|
</ConfigProvider>, |
|
|
|
); |
|
|
|
|
|
|
|
expect(container.querySelector('.ant-picker-calendar')).toHaveClass('test-class'); |
|
|
|
}); |
|
|
|
|
|
|
|
it('Should Calendar style works', () => { |
|
|
|
const { container } = render( |
|
|
|
<ConfigProvider |
|
|
|
calendar={{ |
|
|
|
style: { color: 'red' }, |
|
|
|
}} |
|
|
|
> |
|
|
|
<Calendar style={{ fontSize: '16px' }} /> |
|
|
|
</ConfigProvider>, |
|
|
|
); |
|
|
|
|
|
|
|
expect(container.querySelector('.ant-picker-calendar')).toHaveStyle( |
|
|
|
'color: red; font-size: 16px;', |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
it('Should Card className & style works', () => { |
|
|
|
const { container } = render( |
|
|
|
<ConfigProvider card={{ className: 'cp-card', style: { backgroundColor: 'blue' } }}> |
|
|
|