From e95db210f27d9fd13379c4177b6d0eb10a49a69b Mon Sep 17 00:00:00 2001 From: Ruben Sousa Date: Wed, 19 Jun 2024 23:21:40 +0200 Subject: [PATCH] Deflake grid vertical scroll test --- .../test/tests/scrolling/VerticalGridScrollTest.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dpadrecyclerview/src/androidTest/kotlin/com/rubensousa/dpadrecyclerview/test/tests/scrolling/VerticalGridScrollTest.kt b/dpadrecyclerview/src/androidTest/kotlin/com/rubensousa/dpadrecyclerview/test/tests/scrolling/VerticalGridScrollTest.kt index b763a829..8acbbdfe 100644 --- a/dpadrecyclerview/src/androidTest/kotlin/com/rubensousa/dpadrecyclerview/test/tests/scrolling/VerticalGridScrollTest.kt +++ b/dpadrecyclerview/src/androidTest/kotlin/com/rubensousa/dpadrecyclerview/test/tests/scrolling/VerticalGridScrollTest.kt @@ -294,13 +294,13 @@ class VerticalGridScrollTest : DpadRecyclerViewTest() { // Scroll down until last uneven child is visible repeat(5) { - KeyEvents.pressDown(delay = 500L) + KeyEvents.pressDown() + waitForIdleScrollState() } - waitForIdleScrollState() - repeat(5) { - KeyEvents.pressUp(delay = 500L) + KeyEvents.pressUp() + waitForIdleScrollState() } assertThat(getChildrenBounds()).isEqualTo(childPositions)