-
-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Customize input element of combobox #145
Conversation
RaoHai
commented
Dec 6, 2016
- 为了支持 AutoComplete onKeyPress does not work ant-design/ant-design#4082 (comment) 的用法
</Select> | ||
); | ||
|
||
expect(wrapper.find('textarea').node).not.toBe(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以 expect(wrapper.find('textarea').length).toBe(1)
;
@@ -72,4 +72,20 @@ describe('Select.combobox', () => { | |||
dropdownWrapper.find('MenuItem').first().simulate('click'); | |||
expect(wrapper.state().inputValue).toBe('1'); | |||
}); | |||
|
|||
it('should comstomize input element', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个好像不是 combobox 特有的 api?应该写到 Select.spec.js 里。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,为 tags 和 multiple 也补充了用例。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是公共的 feature 的话其实只要在 Select.spec.js 里写一次就可以了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
放到 Select.spec.js 里会不会被认为是 Select 的基础功能?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我是从代码上看这个 getInputElement
是不分模式的,如果是只能在特定模式下用的话就写到特定模式的测试下。另外其他两个用例不应该直接 copy 已有的用例。
8eff3ed
to
5f4aad6
Compare
+ 为了支持 ant-design/ant-design#4082 (comment) 的用法 + supplement specs of multiple and tags
5f4aad6
to
159f725
Compare
改完了么,修改过程中加个 WIP |
改完了 |
= = 测试要调整下吧。 |
@yesmeck review 完需要合并时通知我 |
@yesmeck 这个可以合了么?combox, multiple, tags 的测试分别放在各自模式的测试文件里不合理么? |
不应该去 copy 别的测试用例。 |
要测 custom input element 的话,测试用例里应该只包含 custom input element 的内容。 |
然后从代码上看这个功能是不分模式的,所以其实没必要每个模式都测一遍。 |
有道理。。 |
propTypes 是不是也写一下。 |
@yiminghe 可以合并了。 |