-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix(Android): Fixed issues with toBeVisible() #4519
Fix(Android): Fixed issues with toBeVisible() #4519
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm so happy that we finally addressed this (even though it's RN's broken logic, at least Detox is able to handle it now).. 💪🏼
I have a few minor cosmetic suggestions, but overall, this fix is quite straightforward and great!
detox/android/detox/src/full/java/com/wix/detox/espresso/DetoxMatcher.java
Outdated
Show resolved
Hide resolved
detox/android/detox/src/full/java/com/wix/detox/espresso/matcher/IsDisplayingAtLeastDetox.kt
Outdated
Show resolved
Hide resolved
detox/android/detox/src/full/java/com/wix/detox/espresso/matcher/IsDisplayingAtLeastDetox.kt
Outdated
Show resolved
Hide resolved
detox/android/detox/src/full/java/com/wix/detox/espresso/matcher/IsDisplayingAtLeastDetox.kt
Outdated
Show resolved
Hide resolved
detox/android/detox/src/full/java/com/wix/detox/espresso/matcher/IsDisplayingAtLeastDetox.kt
Outdated
Show resolved
Hide resolved
detox/android/detox/src/full/java/com/wix/detox/espresso/matcher/IsDisplayingAtLeastDetox.kt
Outdated
Show resolved
Hide resolved
detox/android/detox/src/full/java/com/wix/detox/espresso/matcher/IsDisplayingAtLeastDetox.kt
Outdated
Show resolved
Hide resolved
detox/android/detox/src/full/java/com/wix/detox/espresso/matcher/ViewMatchers.kt
Outdated
Show resolved
Hide resolved
it(':android: should be able to scrollToIndex on vertical scrollviews', async () => { | ||
// should ignore out of bounds children | ||
await element(by.id('ScrollView161')).scrollToIndex(3000); | ||
await element(by.id('ScrollView161')).scrollToIndex(-1); | ||
await expect(element(by.text('Text1'))).toBeVisible(); | ||
|
||
await element(by.id('ScrollView161')).scrollToIndex(11); | ||
await expect(element(by.text('Text12'))).toBeVisible(); | ||
|
||
await element(by.id('ScrollView161')).scrollToIndex(0); | ||
await expect(element(by.text('Text1'))).toBeVisible(); | ||
|
||
await element(by.id('ScrollView161')).scrollToIndex(7); | ||
await expect(element(by.text('Text8'))).toBeVisible(); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It never worked. I'm deprecating this api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecating or removing?
WDYM never worked? We have the test right here 👆🏼
Is it broken now because of this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also if we're deprecating let's mark it with @deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed F2F. This API is really not working. The test was a false positive 🤦🏼♂️
Let's @deprecate
and remove it on next major
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good stuff :)
…duced a regression
Hey @gosha212 I believe it caused my tests in I've tried to update detox to the latest version, but I think this PR caused one of my test to fail constantly. I'm getting:
Let me know which additional information you need to reproduce/fix this problem - I'll be happy to co-operate here! Reproduction can be found at https://github.com/kirillzyusko/react-native-keyboard-controller - you just need to use latest version in |
Hi @kirillzyusko |
Thank you for the update @gosha212! |
Can you please point me to the failing test and how to reproduce it? Which command should I run? |
@kirillzyusko is it easy to reproduce the problem on a side project? It will be easy to work in isolated environment |
@gosha212 I found you on Discord - let's keep conversation there? I believe it'll be more productive 🤞 |
Description
In this pull request, I have created a workaround for View.getGlobalVisibleRect issue in RN