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

test(slider): add Thumb drag interaction tests #610

Merged
merged 6 commits into from
Mar 30, 2022

Conversation

niksa-monday
Copy link
Contributor

@niksa-monday niksa-monday commented Mar 29, 2022

Add interaction tests with Mouse(Pointer) Drag interaction tests for Slider.
Mouse down on Thumb and then move it for change value of Slider.

Some links I used as basis for PR:
https://testing-library.com/docs/example-drag/
testing-library/user-event#440

 - add interaction helper drag
 - add prototype of test for Thumb drag
@niksa-monday niksa-monday requested review from laviomri and a team March 29, 2022 14:15
@niksa-monday niksa-monday changed the title test(slider): try to add mouse drag tests draft: test(slider): try to add mouse drag tests Mar 29, 2022
@niksa-monday niksa-monday marked this pull request as draft March 29, 2022 14:17
 - change mouse event to pointer events
   according to Slider code
…n-tests-slider-thumb

# Conflicts:
#	src/components/Slider/__tests__/Slider.interactions.js
 - switch from 1/4, 3/4, etc. to more clear 0.25, 0.75 etc.
 - minor changes at drag utils
 - make order and finalize drag Slider Thumb tests
@niksa-monday niksa-monday changed the title draft: test(slider): try to add mouse drag tests test(slider): try to add mouse drag tests Mar 30, 2022
@niksa-monday niksa-monday marked this pull request as ready for review March 30, 2022 08:54
@niksa-monday niksa-monday changed the title test(slider): try to add mouse drag tests test(slider): add Thumb drag interaction tests Mar 30, 2022
Copy link
Contributor

@laviomri laviomri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks very cool! had a few comments, for your discretion :)

src/__tests__/interactions-helper.js Show resolved Hide resolved
src/__tests__/interactions-helper.js Show resolved Hide resolved
src/components/Slider/__tests__/Slider.interactions.js Outdated Show resolved Hide resolved
- minor refactoring of prev tests
   (change name and add some comments)
 - add simple Thumbs drag interaction tests for Ranged Slider
 - add Cross Start/End Thumbs tests
@niksa-monday niksa-monday merged commit 783e128 into master Mar 30, 2022
@niksa-monday niksa-monday deleted the feat/nik/interaction-tests-slider-thumb branch March 30, 2022 11:57
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.

2 participants