Skip to content
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 13 commits into from
Apr 20, 2023

Conversation

MuxinFeng
Copy link
Contributor

变更日志:

背景:
升级 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. 键盘操作后未获得预期效果
image

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #226 (118bc34) into master (b2c0c2b) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 118bc34 differs from pull request most recent head 41931cd. Consider uploading reports for the commit 41931cd to get more accurate results

@@            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     
Impacted Files Coverage Δ
src/Dropdown.tsx 100.00% <100.00%> (ø)
src/Overlay.tsx 100.00% <100.00%> (ø)
src/hooks/useAccessibility.ts 100.00% <100.00%> (ø)
tests/utils.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zombieJ zombieJ changed the title test: migrate rc-dropdown tests [WIP] test: migrate rc-dropdown tests Apr 14, 2023
@zombieJ zombieJ marked this pull request as draft April 14, 2023 06:23
@MadCcc MadCcc marked this pull request as ready for review April 20, 2023 03:33
@MadCcc MadCcc changed the title [WIP] test: migrate rc-dropdown tests test: migrate rc-dropdown tests Apr 20, 2023
@MadCcc MadCcc changed the title test: migrate rc-dropdown tests refactor: migrate @rc-component/trigger Apr 20, 2023
@MadCcc MadCcc merged commit 2562c9b into react-component:master Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants