Wait until storage location is initialized for e2e test
This commit is contained in:
parent
ba6dc2ff91
commit
6eaba0b87a
2 changed files with 10 additions and 0 deletions
|
@ -8,6 +8,7 @@ import androidx.annotation.WorkerThread
|
|||
import androidx.preference.PreferenceManager
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.uiautomator.UiDevice
|
||||
import androidx.test.uiautomator.Until
|
||||
import com.stevesoltys.seedvault.crypto.ANDROID_KEY_STORE
|
||||
import com.stevesoltys.seedvault.crypto.KEY_ALIAS_BACKUP
|
||||
import com.stevesoltys.seedvault.crypto.KEY_ALIAS_MAIN
|
||||
|
@ -171,6 +172,11 @@ internal interface LargeTestBase : KoinComponent {
|
|||
useThisFolderButton.clickAndWaitForNewWindow()
|
||||
allowButton.clickAndWaitForNewWindow()
|
||||
}
|
||||
|
||||
BackupScreen {
|
||||
device.wait(Until.hasObject(initializingText), 10000)
|
||||
device.wait(Until.gone(initializingText), 120000)
|
||||
}
|
||||
}
|
||||
|
||||
fun confirmCode() {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.stevesoltys.seedvault.e2e.screen.impl
|
||||
|
||||
import androidx.test.uiautomator.By
|
||||
import androidx.test.uiautomator.BySelector
|
||||
import com.stevesoltys.seedvault.e2e.screen.UiDeviceScreen
|
||||
|
||||
object BackupScreen : UiDeviceScreen<BackupScreen>() {
|
||||
|
@ -11,4 +13,6 @@ object BackupScreen : UiDeviceScreen<BackupScreen>() {
|
|||
val backupStatusButton = findObject { text("Backup status") }
|
||||
|
||||
val backupLocationButton = findObject { text("Backup location") }
|
||||
|
||||
val initializingText: BySelector = By.textContains("Initializing backup location")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue