[RFC] gather testing utils for ant-design-based UI library #42032
mortalYoung
started this conversation in
Ideas
Replies: 4 comments 1 reply
-
这个不一定要做成官方的,因为内部其实也不会特地去维护一套。但是如果有兴趣的话可以发个三方包,官方可以推荐哈~ |
Beta Was this translation helpful? Give feedback.
1 reply
-
@mortalYoung 可以组织一下, 我也想参与贡献. (提个建议, RFC 里面链接使用 commit-shas, 对应页面按下键盘 |
Beta Was this translation helpful? Give feedback.
0 replies
-
搞了一个仓库试试水:https://github.com/mortalYoung/ant-design-testing ,大部分的坑都没填,只实现了大致的思路 |
Beta Was this translation helpful? Give feedback.
0 replies
-
有可能做成框架无关的测试用例?这样社区实现的 vue 等技术栈可能也可以使用,这有助于帮助各技术栈版本实现,能尽量保持一致。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
新增 @ant-design/testing 的包,导出相关函数为 Ant Design 的相关组件做测试
Motivation
Expected
期望能有一个库,把各个测试用到的方法做一个合集来解决上面遇到的问题。
API
API 的设计考虑遵循的规范如下:
input.fireXXXX
input.fireChange
即理解为 Input 组件中触发onChange
函数的动作prefixCls
的修改sleep
可以放common
下Usage
Related Collections
理论上来说,每一个组件的 onXXX 方法貌似都可以有对应的 fireXXX 函数。
考虑到部分组件实现起来比较简单,如 Model 的 onOpen 之类的,所以可是适当实现部分功能
【待补充,大致思路是如下】考虑抽出来的相关用到的函数如下:
Basic
Input
InputNumber
DropDown
Select
Cascader
DatePicker
Beta Was this translation helpful? Give feedback.
All reactions