mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
Improved the DownloadTest to handle cases where pausing the download may show a complete pause message, such as 'Pause: Waiting for Retry,' which previously caused the test case to fail. The test case has been updated to accommodate this behavior.
This commit is contained in:
parent
0278fa8a0c
commit
8770efd03d
@ -24,6 +24,7 @@ import androidx.test.espresso.assertion.ViewAssertions.doesNotExist
|
||||
import androidx.test.espresso.assertion.ViewAssertions.matches
|
||||
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
|
||||
import androidx.test.espresso.matcher.ViewMatchers.withId
|
||||
import androidx.test.espresso.matcher.ViewMatchers.withSubstring
|
||||
import androidx.test.espresso.matcher.ViewMatchers.withText
|
||||
import applyWithViewHierarchyPrinting
|
||||
import com.adevinta.android.barista.interaction.BaristaSleepInteractions
|
||||
@ -131,11 +132,7 @@ class DownloadRobot : BaseRobot() {
|
||||
fun assertDownloadPaused() {
|
||||
testFlakyView({
|
||||
pauseForBetterTestPerformance()
|
||||
onView(
|
||||
withText(
|
||||
org.kiwix.kiwixmobile.core.R.string.paused_state
|
||||
)
|
||||
).check(matches(isDisplayed()))
|
||||
onView(withSubstring(context.getString(string.paused_state))).check(matches(isDisplayed()))
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user