Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

142
Views
How do you detox test a slider using detox?

I have a slider library with name react-native-slider i am using this library to render movable slider on my screen. So Now I want to write it’s detox test I am trying this but i am not getting any successful attempts.

I have attached the below code.

My Code Slider UI code

           <View style={{paddingHorizontal: 25}} testID={Test.sliderThumbDrag}>
             <Slider
              thumbStyle={{ backgroundColor: colors.white, borderWidth: 2, borderColor: colors.black }}
              minimumTrackTintColor={colors.black}
              maximumTrackTintColor={colors.border}
              trackStyle={{ height: 2 }}
              minimumValue={1}
              maximumValue={250}
              value={requestData ? requestData.max_distance : null}
              step={1}
              style={{ marginTop: 12 }}
              onValueChange={(value) => {
                let newRequestData
                if (requestData) {
                  newRequestData = { ...requestData, max_distance: value }
                }
                setRequestData(newRequestData);
              }}
            />
            </View>

My UserFlowDating.e2e.js file

         it('Discovery Filter should render', async () => {
  
          await waitFor(element(by.id(Test.discoveryFilterDatingView))).toBeVisible().withTimeout(5000);
          await waitFor(element(by.id(Test.headerDiscoveryView))).toBeVisible().withTimeout(5000);
          await waitFor(element(by.id(Test.discoveryScrollView))).toBeVisible().withTimeout(5000);
          await waitFor(element(by.id(Test.sliderThumbDrag))).toBeVisible().withTimeout(5000);
          await element(by.id('Animated')).longPressAndDrag(2000, NaN, NaN, element(by.id('Animated')), NaN, NaN);

          await waitFor(element(by.id(Test.discoveryScrollView))).toBeVisible().withTimeout(5000);

        });

I am trying to silde it with detox but it’s not working for me. Anyone can please help me with this thanks 🙏

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!