-
Notifications
You must be signed in to change notification settings - Fork 52
Enhance the Slider Component
#1070
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
Conversation
🦋 Changeset detectedLatest commit: 9922c64 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportBase: 71.72% // Head: 71.94% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## next-v1 #1070 +/- ##
===========================================
+ Coverage 71.72% 71.94% +0.21%
===========================================
Files 217 217
Lines 3056 3062 +6
Branches 842 845 +3
===========================================
+ Hits 2192 2203 +11
+ Misses 740 733 -7
- Partials 124 126 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Chromatic Report🚀 Congratulations! Your build was successful! |
packages/bezier-react/src/components/Forms/Slider/Slider.test.tsx
Outdated
Show resolved
Hide resolved
| /> | ||
| )) } | ||
| { defaultValue.map((v) => ( | ||
| { currentValue.map((v) => ( |
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.
👍
e25a54e to
12d2107
Compare
12d2107 to
2e7a863
Compare
a522c7c to
7ec97eb
Compare
|
실제로 인터렉션 해야하는건 어떻게 테스트 해야할지..? 예제가 혹시 있나요? |
|
pointer([
// touch the screen at element1
{keys: '[TouchA>]', target: element1},
// move the touch pointer to element2
{pointerName: 'TouchA', target: element2},
// release the touch pointer at the last position (element2)
{keys: '[/TouchA]'},
]) |
|
@sungik-choi |
저는 오히려 radix-ui 코드를 테스트하는 게 필요하다고 생각하는 편입니다. 외부 라이브러리 버전이 업데이트되더라도 저희 라이브러리의 일관된 동작을 쉽게 보장할 수 있으려면 현재 버전에서 컴포넌트에 기대하는 동작들에 대한 다양한 테스트 케이스가 필요하다고 생각해요. 더해서 테스트를 잘 작성해두면 추후 내부 구현에 radix-ui가 아닌 다른 라이브러리를 사용한다고 해도 동일하게 동작함을 어느정도 보장할 수도 있다고 생각합니다. |
|
Radix-ui 의 Slider에서 내부적으로 해당 method를 mocking해서 사용하던지 해야할 것 같은데, JSDOM이 완벽히 브라우저와 동일하게 작동한다고 보장하긴 어려울 것 같네요. (비슷한 예를 설명한 아티클) 유저 인터렉션 관련한 부분은 브라우저 시뮬레이터로 테스트하는 것이 리소스는 더 먹겠지만 정확한 방법이라는 생각도 듭니다. |
👍 스토리북에 인터랙션 테스트 기능이 있는데 관련해서 알아보면 좋을 거 같네요. 우선은 mocking해서 가능하다면 그 쪽으로 해결해주시면 좋을 거 같습니다! |
b7596dd to
9922c64
Compare
| /** | ||
| * Radix-ui uses the APIs below, but the DOM in jest (JSDOM) hasn't implemented them. | ||
| * @see https://github.com/radix-ui/primitives/issues/1822 | ||
| */ |
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.
👍

Self Checklist
CODEOWNERSfile.Summary
Enhance/fix the
SlidercomponentDetails
Enhancement
valueprop and change thecurrentValuestate.Fix
currentValuestate instead ofdefaultValueprop.currentValueis changedScreen.Recording.2022-12-07.at.11.41.10.mov
Breaking change or not (Yes/No)
No
References
None