-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
test: activeBar position #891
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough该拉取请求引入了一个新的测试套件,专注于 Changes
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #891 +/- ##
=======================================
Coverage 95.43% 95.43%
=======================================
Files 64 64
Lines 2719 2719
Branches 762 734 -28
=======================================
Hits 2595 2595
Misses 121 121
Partials 3 3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
tests/range.spec.tsx (3)
2059-2074
: 测试组件实现得很好,但建议添加类型注解组件实现了一个很好的测试场景,用于验证 activeBar 的位置变化。不过建议添加以下改进:
- const TestComponent = () => { + const TestComponent: React.FC = () => {
2076-2100
: 测试用例设计合理,建议补充更多场景测试用例很好地验证了 activeBar 在切换 placement 时的位置变化。建议考虑添加以下改进:
- 补充测试 activeBar 的其他样式属性(如 width、transition 等)
- 添加边界情况测试(如快速切换 placement)
- 验证 activeBar 动画效果
2063-2063
: 建议移除无用的 className- <DayRangePicker className="#test-container" placement={placement} /> + <DayRangePicker placement={placement} />className "#test-container" 在测试中未被使用,建议移除。
Add testcase for the position of activeBar when changing placement direction.
Since this is my first time writing test cases, it may not be written well.
related to #889
Summary by CodeRabbit
DayRangePicker
组件的测试套件,验证活动条在位置变化时的正确性。