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

Android won't unpress button #3857

Closed
1 of 2 tasks
hkaras19 opened this issue Jan 19, 2023 · 2 comments
Closed
1 of 2 tasks

Android won't unpress button #3857

hkaras19 opened this issue Jan 19, 2023 · 2 comments

Comments

@hkaras19
Copy link

What happened?

I have a detox test suite that runs without errors on iOS; however, I am running into an issue when trying the same tests on the android emulator. The start of my test consists of filling out a login page with some credentials and hitting login. The test is successfully able to fill out the credentials and press the login button. However, the login button is not released. I am able to see the button turn grey (indicating it is pressed), but the onPress is never fired and the button does not visually change to an unpressed stte. I have tried a few different variations such as using a Button component, rather than a TouchableOpacity, using the .multiTap(1) method instead of .tap() with no luck. I have further attempted to simply press a button in an empty view but run into the same issue.

Action in question
await element(by.text('Login')).tap()

Although there are no device error logs, I do get the following error if I attempt to manually unpress the button after the test has finished.

01-17 22:09:07.036 8308 8308 E unknown:ReactNative: Received an ACTION_CANCEL touch event for which we have no corresponding ACTION_DOWN
01-17 22:09:07.038 8308 8308 E unknown:ReactNative: Got DOWN touch before receiving UP or CANCEL from last gesture

Note: I have also found that in order for my test builds to pick up on changes, I must run the following command before creating the build:

rm -rf android/app/src/main/res/drawable-* && react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

What was the expected behaviour?

The button should press and release to trigger my onPress method

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

Simply press a button using the .tap() method on the android emulator

In what environment did this happen?

Detox version: ^20.0.3
React Native version: 0.70.5
Has Fabric (React Native's new rendering system) enabled: no
Node version: v16.17.0
Device model: Pixel_5_API_33
Android version:
Test-runner (select one): jest

Detox logs

Content is too large to post. If necessary, I can look for a specific part of the logs.

Device logs

Content is too large to post. If necessary, I can look for a specific part of the logs.

More data, please!

No response

@hkaras19
Copy link
Author

update: same issue as 3762

@d4vidi
Copy link
Collaborator

d4vidi commented Jan 19, 2023

Thanks @hkaras19, closing as a dup

@d4vidi d4vidi closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants