mirror of
https://github.com/hmalik144/Driver.git
synced 2026-03-18 07:26:03 +00:00
- lowered espresso version
Took 16 minutes
This commit is contained in:
@@ -113,7 +113,7 @@ dependencies {
|
|||||||
/ * Android Espresso */
|
/ * Android Espresso */
|
||||||
def testJunitVersion = "1.1.5"
|
def testJunitVersion = "1.1.5"
|
||||||
def testRunnerVersion = "1.5.2"
|
def testRunnerVersion = "1.5.2"
|
||||||
def espressoVersion = "3.5.1"
|
def espressoVersion = "3.5.0"
|
||||||
androidTestImplementation "androidx.test.ext:junit:$testJunitVersion"
|
androidTestImplementation "androidx.test.ext:junit:$testJunitVersion"
|
||||||
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
|
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
|
||||||
androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$espressoVersion"
|
androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$espressoVersion"
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ open class FirebaseTest<T : BaseActivity<*>>(
|
|||||||
@JvmStatic
|
@JvmStatic
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
fun setupFirebase() {
|
fun setupFirebase() {
|
||||||
// val localHost = if (BuildConfig.LocalState) "10.0.2.2" else "127.0.0.53"
|
|
||||||
val localHost = "10.0.2.2"
|
val localHost = "10.0.2.2"
|
||||||
|
|
||||||
FirebaseAuth.getInstance().useEmulator(localHost, 9099)
|
FirebaseAuth.getInstance().useEmulator(localHost, 9099)
|
||||||
|
|||||||
@@ -18,15 +18,10 @@ import org.junit.runner.RunWith
|
|||||||
@RunWith(AndroidJUnit4::class)
|
@RunWith(AndroidJUnit4::class)
|
||||||
class RegisteredUserAuthenticationActivityTest : FirebaseTest<LoginActivity>(LoginActivity::class.java, registered = true, signedIn = false) {
|
class RegisteredUserAuthenticationActivityTest : FirebaseTest<LoginActivity>(LoginActivity::class.java, registered = true, signedIn = false) {
|
||||||
|
|
||||||
@Before
|
|
||||||
fun waitForSplashScreen() {
|
|
||||||
waitFor(100)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun verifyUserLogin_validUsernameAndPassword_loggedIn() {
|
fun verifyUserLogin_validUsernameAndPassword_loggedIn() {
|
||||||
login {
|
login {
|
||||||
println("lets get the email = ${getEmail()}")
|
waitFor(100)
|
||||||
setEmail(getEmail())
|
setEmail(getEmail())
|
||||||
setPassword(USER_PASSWORD)
|
setPassword(USER_PASSWORD)
|
||||||
clickLogin()
|
clickLogin()
|
||||||
|
|||||||
@@ -18,14 +18,10 @@ import org.junit.runner.RunWith
|
|||||||
@RunWith(AndroidJUnit4::class)
|
@RunWith(AndroidJUnit4::class)
|
||||||
class UserAuthenticationActivityTest : FirebaseTest<LoginActivity>(LoginActivity::class.java) {
|
class UserAuthenticationActivityTest : FirebaseTest<LoginActivity>(LoginActivity::class.java) {
|
||||||
|
|
||||||
@Before
|
|
||||||
fun waitForSplashScreen() {
|
|
||||||
waitFor(100)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun verifyUserRegistration_validUsernameAndPassword_loggedIn() {
|
fun verifyUserRegistration_validUsernameAndPassword_loggedIn() {
|
||||||
login {
|
login {
|
||||||
|
waitFor(100)
|
||||||
clickRegister()
|
clickRegister()
|
||||||
}
|
}
|
||||||
register {
|
register {
|
||||||
|
|||||||
Reference in New Issue
Block a user