question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] Slider doesn't trigger onValueChange/onSlidingComplete when adjusted with Detox adjustSliderToPosition()

See original GitHub issue

Environment

❯ react-native info info Fetching system and libraries information… System: OS: macOS 12.1 CPU: (10) arm64 Apple M1 Pro Memory: 201.50 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.2 - /var/folders/51/8pncdp0x14d04bbk454szsnw0000gn/T/fnm_multishells/16782_1643016955991/bin/node Yarn: 1.22.5 - ~/.yarn/bin/yarn npm: 8.1.2 - /var/folders/51/8pncdp0x14d04bbk454szsnw0000gn/T/fnm_multishells/16782_1643016955991/bin/npm Watchman: 2022.01.03.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.2 - /Users/moox/.gem/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 11.0.10 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: ^17.0.2 => 17.0.2 react-native: 0.67.0-rc.6 => 0.67.0-rc.6 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Description

I am using detox to automated some tests and just faced the fact that using adjustSliderToPosition() API doesn’t trigger onValueChange nor onSlidingComplete, so in my case it’s like the slider hasn’t been moved (it is, visually, but programmatically, no call have been made)

Reproducible Demo

I can’t really do a quick demo 😕

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
MoOxcommented, Jan 24, 2022

Just in case somebody is looking for a workaround: just use Detox swipe() method with the proper argument so it works for you (in my case a simple await element(by.id('GoalEdit_durationSlider')).swipe('right', 'slow', 0.3, 0); did the trick.

1reaction
MoOxcommented, Jan 24, 2022

I tried this version right now, I am facing the same problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

adjustSliderToPosition not working on @react-native ... - GitHub
When using the adjustSliderToPosition on the new @react-native-community/slider package target view is not matched, error log here:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found