mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
adding login timeouts to reduce flakyness during login
This commit is contained in:
parent
3760401b10
commit
ed4f26de81
1 changed files with 4 additions and 0 deletions
|
@ -29,8 +29,10 @@ import im.vector.app.R
|
||||||
import im.vector.app.espresso.tools.waitUntilActivityVisible
|
import im.vector.app.espresso.tools.waitUntilActivityVisible
|
||||||
import im.vector.app.features.home.HomeActivity
|
import im.vector.app.features.home.HomeActivity
|
||||||
import im.vector.app.waitForView
|
import im.vector.app.waitForView
|
||||||
|
import java.lang.Thread.sleep
|
||||||
|
|
||||||
class UiTestBase {
|
class UiTestBase {
|
||||||
|
|
||||||
fun createAccount(userId: String, password: String = "password", homeServerUrl: String = "http://10.0.2.2:8080") {
|
fun createAccount(userId: String, password: String = "password", homeServerUrl: String = "http://10.0.2.2:8080") {
|
||||||
initSession(true, userId, password, homeServerUrl)
|
initSession(true, userId, password, homeServerUrl)
|
||||||
}
|
}
|
||||||
|
@ -52,6 +54,7 @@ class UiTestBase {
|
||||||
writeTo(R.id.loginServerUrlFormHomeServerUrl, homeServerUrl)
|
writeTo(R.id.loginServerUrlFormHomeServerUrl, homeServerUrl)
|
||||||
assertEnabled(R.id.loginServerUrlFormSubmit)
|
assertEnabled(R.id.loginServerUrlFormSubmit)
|
||||||
closeSoftKeyboard()
|
closeSoftKeyboard()
|
||||||
|
sleep(500)
|
||||||
clickOn(R.id.loginServerUrlFormSubmit)
|
clickOn(R.id.loginServerUrlFormSubmit)
|
||||||
onView(isRoot()).perform(waitForView(withId(R.id.loginSignupSigninSubmit)))
|
onView(isRoot()).perform(waitForView(withId(R.id.loginSignupSigninSubmit)))
|
||||||
|
|
||||||
|
@ -75,6 +78,7 @@ class UiTestBase {
|
||||||
assertEnabled(R.id.loginSubmit)
|
assertEnabled(R.id.loginSubmit)
|
||||||
|
|
||||||
closeSoftKeyboard()
|
closeSoftKeyboard()
|
||||||
|
sleep(500)
|
||||||
clickOn(R.id.loginSubmit)
|
clickOn(R.id.loginSubmit)
|
||||||
|
|
||||||
// Wait
|
// Wait
|
||||||
|
|
Loading…
Reference in a new issue