-
Notifications
You must be signed in to change notification settings - Fork 103
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
refactor: migrate @rc-component/trigger #226
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #226 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 5 +2
Lines 103 104 +1
Branches 30 29 -1
=========================================
+ Hits 103 104 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 中能够达到预期)
![image](https://user-images.githubusercontent.com/46584765/227850074-0596e5ad-3b62-48a6-afb8-d8c8b81db089.png)
a. 未获取 align 后的样式
b. 键盘操作后未获得预期效果