react-native-slider icon indicating copy to clipboard operation
react-native-slider copied to clipboard

testID props is not found(For Jest test case)

Open vishaldhanotiyadev opened this issue 2 years ago • 2 comments

Is there any way to write a test case for the slider? When I try to write test case but I am unable to find testID in the slider module.

vishaldhanotiyadev avatar Jul 06 '22 13:07 vishaldhanotiyadev

@vishaldhanotiyapersistent you're right that there isn’t currently any way to set a testID. Looking at the render hierarchy there isn’t a great place to put one. Many testing tool should also allow you to find elements by another mechanism as well.

miblanchard avatar Jul 07 '22 11:07 miblanchard

Yeah, I did the same set a testID to view and then check the children component render hierarchy to write the test case..

is there any plan in the near future to add testID in the slider?

vishaldhanotiyadev avatar Jul 07 '22 11:07 vishaldhanotiyadev

Since there isn't a good element to attach the test Id I don't have any plans to support a testId prop anytime soon.

miblanchard avatar Dec 28 '22 00:12 miblanchard