mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Test: Fix test after change on OnBoarding screens
This commit is contained in:
parent
a552be040d
commit
d5968e442c
2 changed files with 8 additions and 14 deletions
|
@ -32,7 +32,7 @@ import im.vector.app.espresso.tools.waitUntilDialogVisible
|
|||
import im.vector.app.espresso.tools.waitUntilViewVisible
|
||||
import im.vector.app.features.createdirect.CreateDirectRoomActivity
|
||||
import im.vector.app.features.home.HomeActivity
|
||||
import im.vector.app.features.login.LoginActivity
|
||||
import im.vector.app.features.onboarding.OnboardingActivity
|
||||
import im.vector.app.initialSyncIdlingResource
|
||||
import im.vector.app.ui.robot.settings.SettingsRobot
|
||||
import im.vector.app.withIdlingResource
|
||||
|
@ -123,7 +123,7 @@ class ElementRobot {
|
|||
clickDialogPositiveButton()
|
||||
}
|
||||
|
||||
waitUntilActivityVisible<LoginActivity> {
|
||||
waitUntilActivityVisible<OnboardingActivity> {
|
||||
assertDisplayed(R.id.loginSplashLogo)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,11 @@ class OnboardingRobot {
|
|||
homeServerUrl: String) {
|
||||
waitUntilViewVisible(withId(R.id.loginSplashSubmit))
|
||||
assertDisplayed(R.id.loginSplashSubmit, R.string.login_splash_submit)
|
||||
clickOn(R.id.loginSplashSubmit)
|
||||
if (createAccount) {
|
||||
clickOn(R.id.loginSplashSubmit)
|
||||
} else {
|
||||
clickOn(R.id.loginSplashAlreadyHaveAccount)
|
||||
}
|
||||
assertDisplayed(R.id.loginServerTitle, R.string.login_server_title)
|
||||
// Chose custom server
|
||||
clickOn(R.id.loginServerChoiceOther)
|
||||
|
@ -54,17 +58,7 @@ class OnboardingRobot {
|
|||
assertEnabled(R.id.loginServerUrlFormSubmit)
|
||||
closeSoftKeyboard()
|
||||
clickOn(R.id.loginServerUrlFormSubmit)
|
||||
onView(isRoot()).perform(waitForView(withId(R.id.loginSignupSigninSubmit)))
|
||||
|
||||
if (createAccount) {
|
||||
// Click on the signup button
|
||||
assertDisplayed(R.id.loginSignupSigninSubmit)
|
||||
clickOn(R.id.loginSignupSigninSubmit)
|
||||
} else {
|
||||
// Click on the signin button
|
||||
assertDisplayed(R.id.loginSignupSigninSignIn)
|
||||
clickOn(R.id.loginSignupSigninSignIn)
|
||||
}
|
||||
onView(isRoot()).perform(waitForView(withId(R.id.loginField)))
|
||||
|
||||
// Ensure password flow supported
|
||||
assertDisplayed(R.id.loginField)
|
||||
|
|
Loading…
Reference in a new issue