我们做了个antd的测试helper库,是否有人对此感兴趣?(A testing-helper library for antd) #47171
JackWang032
started this conversation in
Show and tell
Replies: 2 comments 5 replies
-
居然是前公司的😄 |
Beta Was this translation helpful? Give feedback.
4 replies
-
A simple demo to preview https://stackblitz.com/edit/stackblitz-starters-okqgwi?file=src%2Fpages%2Fcomponents%2Flogin%2F__tests__%2Flogin.test.tsx |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
仓库地址:https://github.com/DTStack/ant-design-testing
本库为 antd 的组件提供了元素查询方法与事件触发方法,当我们想要为包含 antd 的组件进行测试时,使用该库可以很便捷的编写用例,
比如下面是个登录输入框案例:
我想测试该功能,可以这样编写:
我们为大部分组件提供了
fire
事件与query
查询方法,这通常在写集成测试时非常有用,您无需再去关注 antd 组件的源码实现,但目前仍有许多需要改进的地方。对本项目感兴趣的同学,可以协助我们提相关的建议或pr,该项目目前只在我们的开源项目Taier 与产品中实践使用,还并不稳定,因此我们非常需要大家的建议!
Beta Was this translation helpful? Give feedback.
All reactions