diff --git a/components/input/__tests__/index.test.js b/components/input/__tests__/index.test.js index 42f33c240d..2e661fb892 100644 --- a/components/input/__tests__/index.test.js +++ b/components/input/__tests__/index.test.js @@ -373,4 +373,11 @@ describe('Input allowClear', () => { const wrapper = mount(); expect(wrapper).toBeTruthy(); }); + + it('should display boolean value as string', () => { + const wrapper = mount(); + expect(wrapper.find('input').first().getDOMNode().value).toBe('true'); + wrapper.setProps({ value: false }); + expect(wrapper.find('input').first().getDOMNode().value).toBe('false'); + }); }); diff --git a/components/input/__tests__/textarea.test.js b/components/input/__tests__/textarea.test.js index 320d29f872..f2867a2702 100644 --- a/components/input/__tests__/textarea.test.js +++ b/components/input/__tests__/textarea.test.js @@ -509,4 +509,11 @@ describe('TextArea allowClear', () => { expect(document.activeElement).toBe(wrapper.find('textarea').at(0).getDOMNode()); wrapper.unmount(); }); + + it('should display boolean value as string', () => { + const wrapper = mount(