mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 23:07:26 -04:00
Refactored the UI test cases according to this new change.
This commit is contained in:
parent
386a93699b
commit
b3cff85921
@ -77,7 +77,13 @@ class DownloadRobot : BaseRobot() {
|
||||
onView(withText(string.swipe_down_for_library)).check(matches(isDisplayed()))
|
||||
refreshOnlineList()
|
||||
} catch (e: RuntimeException) {
|
||||
// do nothing as the view is not visible
|
||||
try {
|
||||
// do nothing as currently downloading the online library.
|
||||
onView(withId(R.id.onlineLibraryProgressLayout)).check(matches(isDisplayed()))
|
||||
} catch (e: RuntimeException) {
|
||||
// if not visible try to get the online library.
|
||||
refreshOnlineList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,13 @@ class InitialDownloadRobot : BaseRobot() {
|
||||
onView(withText(string.swipe_down_for_library)).check(matches(isDisplayed()))
|
||||
refreshOnlineList()
|
||||
} catch (e: RuntimeException) {
|
||||
// do nothing as the view is not visible
|
||||
try {
|
||||
// do nothing as currently downloading the online library.
|
||||
onView(withId(R.id.onlineLibraryProgressLayout)).check(matches(isDisplayed()))
|
||||
} catch (e: RuntimeException) {
|
||||
// if not visible try to get the online library.
|
||||
refreshOnlineList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,13 @@ class LanguageRobot : BaseRobot() {
|
||||
onView(ViewMatchers.withText(string.swipe_down_for_library)).check(matches(isDisplayed()))
|
||||
refreshOnlineList()
|
||||
} catch (e: RuntimeException) {
|
||||
// do nothing as the view is not visible
|
||||
try {
|
||||
// do nothing as currently downloading the online library.
|
||||
onView(withId(R.id.onlineLibraryProgressLayout)).check(matches(isDisplayed()))
|
||||
} catch (e: RuntimeException) {
|
||||
// if not visible try to get the online library.
|
||||
refreshOnlineList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user