Browse Source
* fix(InputNumber): Fix incorrect disable state style for input box components with front and rear label configuration * fix(InputNumber): Add case previews for pre and post tags and prefix activation in the disabled state in InputNumber, and add corresponding test cases * fix(InputNumber): Fix the issue of incorrect inputNumber background color caused by the original prefix icon being disabled * fix(InputNumber): Remove the toggle disable state interaction in the addon case * fix(InputNumber): Optimize and merge style processing * fix(InputNumber): Adjust the addon case and remove irrelevant cases * fix(InputNumber): Update the snapshot in the InputNumber component unit test * fix(InputNumber): Fix the issue of incorrect test snapshots caused by adjusting the controls in the disabled state display * fix(InputNumber): Fix the issue of incorrect test snapshots caused by adjusting the controls in the disabled state display * fix(InputNumber): Fix the issue of incorrect test snapshots caused by adjusting the controls in the disabled state display * fix(InputNumber): Fix the issue of incorrect test snapshots caused by adjusting the controls in the disabled state display * fix(InputNumber): Fix the issue of incorrect test snapshots caused by adjusting the controls in the disabled state displaypull/43053/head
KAM
1 year ago
committed by
GitHub
6 changed files with 550 additions and 12 deletions
@ -0,0 +1,39 @@ |
|||
import React from 'react'; |
|||
import InputNumber from '..'; |
|||
import { render } from '../../../tests/utils'; |
|||
|
|||
describe('addon', () => { |
|||
it('disabled status when prefix is active', () => { |
|||
const { container } = render(<InputNumber prefix="¥" defaultValue={100} disabled controls />); |
|||
expect(container.querySelector('.ant-input-number-affix-wrapper-disabled')).toBeInTheDocument(); |
|||
}); |
|||
|
|||
it('disabled status when addon is active', () => { |
|||
const { container } = render( |
|||
<InputNumber |
|||
prefix="¥" |
|||
addonBefore="Before" |
|||
addonAfter="After" |
|||
defaultValue={100} |
|||
disabled |
|||
controls |
|||
/>, |
|||
); |
|||
expect(container.querySelector('.ant-input-number-wrapper-disabled')).toBeInTheDocument(); |
|||
}); |
|||
|
|||
it('disabled status when prefix and addon is active', () => { |
|||
const { container } = render( |
|||
<InputNumber |
|||
prefix="¥" |
|||
addonBefore="Before" |
|||
addonAfter="After" |
|||
defaultValue={100} |
|||
disabled |
|||
controls |
|||
/>, |
|||
); |
|||
expect(container.querySelector('.ant-input-number-wrapper-disabled')).toBeInTheDocument(); |
|||
expect(container.querySelector('.ant-input-number-affix-wrapper-disabled')).toBeInTheDocument(); |
|||
}); |
|||
}); |
Loading…
Reference in new issue