android / android/android-test

UIScrollable.scrollIntoView- reload data while executed scrollToBeginning in the method

Offen
#810 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
1.2k
Forks
342
Ø Merge
11 Std. 29 Min.
Gemergte PRs (30 T.)
2

Beschreibung

### Description
When UIScrollable.getChildByDescription starts working and goes to execute scrollIntoView, first it does scrollToBeginning (which provokes updating of the list if the list is at the beginning), and only then it scrolls down and finds the desired element. How can I disable updating the list if the list is already at the beginning?

### Steps to Reproduce
RecyclerView with the required elements has a parent SwipeRefreshLayout.
Try calling the method UIScrollable.getChildByDescription (or UIScrollable.scrollIntoView) for element in RecyclerView.

### Expected Results
Scrolling is performed until the desired element is found.

### Actual Results
RecyclerView are reloaded and only then scrolling is performed until the required element is found
data reload happens because of this:
https://android.googlesource.com/platform/frameworks/testing/+/f612e6a05f47b28ae0f5715545658c08dd759dd7/uiautomator/library/src/com/android/uiautomator/core/UiScrollable.java#210

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit UiScrollable.java bei der verlinkten Implementierung von scrollToBeginning und verfolge anschließend UIScrollable.getChildByDescription und scrollIntoView in der Reproduktion mit RecyclerView innerhalb von SwipeRefreshLayout. Bestätige, ob das Erreichen des Anfangs einen Reload auslöst, und betrachte die Arbeit als abgeschlossen, wenn das Zielelement ohne einen unnötigen Daten-Reload gefunden wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
mobile, testing
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.