From b7636a7f63f8a95e3abd0c13838774c19ba43683 Mon Sep 17 00:00:00 2001 From: tjz <415800467@qq.com> Date: Fri, 1 Jun 2018 21:25:16 +0800 Subject: [PATCH] test: add table selectionbox test --- components/checkbox/Checkbox.jsx | 4 +- components/radio/Radio.jsx | 5 +- .../table/__tests__/SelectionBox.test.js | 145 ++++++++++++++ .../table/__tests__/Table.filter.test.js | 179 ++++++++++-------- components/table/interface.js | 1 + 5 files changed, 250 insertions(+), 84 deletions(-) create mode 100644 components/table/__tests__/SelectionBox.test.js diff --git a/components/checkbox/Checkbox.jsx b/components/checkbox/Checkbox.jsx index b8bc6fe12..92a7d11d9 100644 --- a/components/checkbox/Checkbox.jsx +++ b/components/checkbox/Checkbox.jsx @@ -15,6 +15,7 @@ export default { isGroup: Boolean, value: [String, Number, Boolean], name: String, + id: String, indeterminate: Boolean, type: PropTypes.string.def('checkbox'), autoFocus: Boolean, @@ -113,6 +114,7 @@ export default { checkboxClass, name, $slots, sChecked, onFocus, onBlur, + id, } = this const { prefixCls, @@ -136,7 +138,7 @@ export default { diff --git a/components/radio/Radio.jsx b/components/radio/Radio.jsx index a3fe62b3b..5ba13dd2c 100644 --- a/components/radio/Radio.jsx +++ b/components/radio/Radio.jsx @@ -13,6 +13,7 @@ export default { isGroup: Boolean, value: PropTypes.any, name: String, + id: String, }, model: { prop: 'checked', @@ -87,13 +88,13 @@ export default { }, }, render () { - const { classes, checkboxClass, disabled, prefixCls, stateChecked, handleChange, name, $slots } = this + const { id, classes, checkboxClass, disabled, prefixCls, stateChecked, handleChange, name, $slots } = this return (