Skip to content

Commit 969ad0d

Browse files
MohitMaliDeveloperkelson42
authored andcommitted
Increase timeout to check views are displayed or not.
1 parent a7b5a77 commit 969ad0d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostRobot.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class ZimHostRobot : BaseRobot() {
110110
}
111111

112112
private fun selectZimFile(position: Int) {
113+
pauseForBetterTestPerformance()
113114
try {
114115
onView(
115116
RecyclerViewMatcher(R.id.recyclerViewZimHost).atPositionOnView(
@@ -118,6 +119,7 @@ class ZimHostRobot : BaseRobot() {
118119
)
119120
).check(matches(ViewMatchers.isChecked()))
120121
} catch (assertionError: AssertionFailedError) {
122+
pauseForBetterTestPerformance()
121123
onView(
122124
RecyclerViewMatcher(R.id.recyclerViewZimHost).atPositionOnView(
123125
position,
@@ -146,6 +148,6 @@ class ZimHostRobot : BaseRobot() {
146148
}
147149

148150
private fun pauseForBetterTestPerformance() {
149-
BaristaSleepInteractions.sleep(TestUtils.TEST_PAUSE_MS_FOR_SEARCH_TEST.toLong())
151+
BaristaSleepInteractions.sleep(TestUtils.TEST_PAUSE_MS.toLong())
150152
}
151153
}

0 commit comments

Comments
 (0)