refactor: migrate @rc-component/trigger #226
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
变更日志:
背景:
升级 rc-trigger 依赖版本,测试用例都报错,在请教如何改写 getPopupDomNode 方法时,大佬建议尝试迁移一下测试库。
已完成的:
依赖方面,安装了 @rc-component/trigger、@testing-library/react,升级了 @types/*、react (为了解决问题:Cannot find module 'react-dom/client' from 'pure.js')
重写部分测试用例
优化 dropdown.tsx 代码,详见 comment
未完成的:
有 7 个测试用例没过,大致分为两类(在实际的 demo 中能够达到预期)

a. 未获取 align 后的样式
b. 键盘操作后未获得预期效果