-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
assertDisplayedAtPosition doesn't assert displayed list view #283
Comments
Hi @headsvk. I'm very sorry for not getting back to you sooner. I'm not personally familiar with the code in Would you be able to create a tests reproducing the issue so we could try to find a solution? |
I have the exactly same issue as @headsvk does. |
And here is our horrible fix for it :-)
And here is our findDisplayedViewById() method:
|
…displayed list view I removed the scrollListToPosition from assertDisplayedAtPosition as it is done in assertCustomAssertionAtPosition. isShowOnScreen checks to see if the view is visible to the user. getShownViewsById retuns a list of all views that match the viewId and are visible to the user.
#354) * Fix issue #283 assertDisplayedAtPosition doesn't assert displayed list view I removed the scrollListToPosition from assertDisplayedAtPosition as it is done in assertCustomAssertionAtPosition. isShowOnScreen checks to see if the view is visible to the user. getShownViewsById retuns a list of all views that match the viewId and are visible to the user. * Fix tests * With text barista (#388) * Create withCompatText * Move all withText(String) to withCompatText(String) * Add tests * Use custom matchers, no need to creater one * Fix tests * Fix test Co-authored-by: Rafa Vázquez <[email protected]> Co-authored-by: Roc Boronat <[email protected]> Co-authored-by: Bernat Borrás Paronella <[email protected]>
Hi,
I found a problem with
BaristaListAssertions.assertDisplayedAtPosition(...)
.When multiple list ids match (like in a ViewPager), it scrolls the displayed list but then it asserts on the first list that matches the id.
I believe the problem is in internal
matchRecyclerView
andmatchListView
functions.https://github.com/SchibstedSpain/Barista/blob/aed99b678889a16bbfdf08657740122698691d54/library/src/main/java/com/schibsted/spain/barista/assertion/BaristaListAssertions.kt#L108
They both use simple
view.rootView.findViewById
which returns the first match.The text was updated successfully, but these errors were encountered: