react-component / react-component/slider

Ease of testing with React Testing Library

Open
#626 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.1k
Forks
768
Avg merge
11d 22h
Merged PRs (30d)
5

Description

We've been trying to test the range component and the effects it causes but we have had a rough time figuring out the events we need to pass the handle in order to correctly simulate a drag and drop. Anytime we interact with the range it sets the leftmost handle to a value of zero no matter where the click event is fired or which handle it is fired on. Looking at your source it looks like Enzyme is able to handle this but when we tried to recreate the test in RTL we ran into the above issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the range component's existing Enzyme test with the reported React Testing Library interaction. Reproduce the drag or click behavior and verify which events are passed to each handle; done means RTL interaction no longer resets the leftmost handle to zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.