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

Detox waits for animations despite disableSynchronization #1696

Closed
plaa opened this issue Oct 14, 2019 · 2 comments
Closed

Detox waits for animations despite disableSynchronization #1696

plaa opened this issue Oct 14, 2019 · 2 comments

Comments

@plaa
Copy link

plaa commented Oct 14, 2019

Describe the bug

I have a text input with search suggestions updating in realtime. On every key press, it starts a 400 ms animation graying out the current suggestions and (after a short delay) sends a request to fetch suggestions from the server.

By default, when typing into the text input using Detox, it waits for both the network request and animation to complete on every character. When I first run await device.disableSynchronization(); it no longer waits for the network request, but it still waits for the animation to complete. This makes it horribly slow to type into the text input.

The docs say that device.disableSynchronization disables the synchronization mechanism, which I assume means all synchronization, including animations.

To Reproduce

  • [ x ] I have tested this issue on the latest Detox release and it still reproduces

Provide the steps necessary to reproduce the issue. If you are seeing a regression, try to provide the last known version where the issue did not reproduce.

  1. Create app that uses animations (in my case Animated.timing(this.state.contentOpacity, { toValue: 0.4, duration: 600 }).start(); whenever text input changes)
  2. Perform actions that trigger the animation while in disableSynchronization:
    await device.disableSynchronization();
    await element(by.id('ProductSearchBar.TextInput')).typeText('somestuff');

Expected behavior
Synchronization should be disabled and text typed in fast. In reality it waits for the animation to complete after each character.

Environment (please complete the following information):

  • Detox: 14.4.1
  • React Native: 0.59.8
  • Node: 12.8.1
  • Device: Android emulator Pixel 2 API 29
  • OS: Android
@plaa
Copy link
Author

plaa commented Oct 14, 2019

This may actually be related or a duplicate of #1513.

@LeoNatan
Copy link
Contributor

This is a dupe. Pull requests are welcome!

@lock lock bot locked as resolved and limited conversation to collaborators Oct 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants