Skip to content

Commit

Permalink
Refactored the UI test cases according to this new change.
Browse files Browse the repository at this point in the history
  • Loading branch information
MohitMaliDeveloper committed Sep 19, 2024
1 parent 386a936 commit b3cff85
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}

Expand Down

0 comments on commit b3cff85

Please sign in to comment.