- update FirebaseTest.kt local host

Took 9 minutes
This commit is contained in:
2023-03-15 22:04:40 +00:00
parent 2a3b2cac10
commit 641ad859d8
2 changed files with 9 additions and 5 deletions

View File

@@ -53,7 +53,6 @@ jobs:
post-emulator-launch-assemble-command: ./gradlew assembleDriverDebugAndroidTest post-emulator-launch-assemble-command: ./gradlew assembleDriverDebugAndroidTest
test-command: ./gradlew connectedDriverDebugAndroidTest test-command: ./gradlew connectedDriverDebugAndroidTest
system-image: system-images;android-25;google_apis;x86 system-image: system-images;android-25;google_apis;x86
run-logcat: true
no-snapshot: false no-snapshot: false
# And finally run the release build # And finally run the release build
# - run: # - run:

View File

@@ -61,11 +61,16 @@ open class FirebaseTest<T : BaseActivity<*>>(
// remove the user we created for testing // remove the user we created for testing
suspend fun removeUser() { suspend fun removeUser() {
try {
getEmail()?.let { getEmail()?.let {
if (firebaseAuthSource.getUser() == null) firebaseAuthSource.signIn(email = it, password = USER_PASSWORD).await() if (firebaseAuthSource.getUser() == null) firebaseAuthSource.signIn(email = it, password = USER_PASSWORD).await()
firebaseAuthSource.reauthenticate(it, USER_PASSWORD).await() firebaseAuthSource.reauthenticate(it, USER_PASSWORD).await()
firebaseAuthSource.deleteProfile().await() firebaseAuthSource.deleteProfile().await()
} }
} catch (e: Exception) {
e.printStackTrace()
}
} }
fun generateEmailAddress(): String { fun generateEmailAddress(): String {