- android bumblebee gradle migration

- lint driverDebug
 - view binding migration

Took 12 hours 10 minutes
This commit is contained in:
2023-03-24 19:15:48 +00:00
parent 7f4060f1c2
commit 1b00d7d40d
125 changed files with 1163 additions and 1013 deletions

View File

@@ -15,9 +15,13 @@ import org.hamcrest.CoreMatchers.anything
open class BaseTestRobot {
fun fillEditText(resId: Int, text: String?): ViewInteraction =
onView(withId(resId)).perform(ViewActions.replaceText(text), ViewActions.closeSoftKeyboard())
onView(withId(resId)).perform(
ViewActions.replaceText(text),
ViewActions.closeSoftKeyboard()
)
fun clickButton(resId: Int): ViewInteraction = onView((withId(resId))).perform(ViewActions.click())
fun clickButton(resId: Int): ViewInteraction =
onView((withId(resId))).perform(ViewActions.click())
fun textView(resId: Int): ViewInteraction = onView(withId(resId))
@@ -35,6 +39,7 @@ open class BaseTestRobot {
fun checkErrorOnTextEntry(resId: Int, errorMessage: String): ViewInteraction =
onView(withId(resId)).check(matches(checkErrorMessage(errorMessage)))
fun getStringFromResource(@StringRes resId: Int): String = Resources.getSystem().getString(resId)
fun getStringFromResource(@StringRes resId: Int): String =
Resources.getSystem().getString(resId)
}

View File

@@ -16,7 +16,7 @@ import org.junit.After
import org.junit.Before
open class BaseUiTest<T : BaseActivity<*>>(
open class BaseUiTest<T : BaseActivity<*,*>>(
private val activity: Class<T>
) {

View File

@@ -3,7 +3,8 @@ package h_mal.appttude.com
private const val apiKey = "test_key"
const val signUpFirebase = "http://identitytoolkit.googleapis.com/v1/accounts:signUp?key=$apiKey"
const val deleteAccountFirebase = "http://10.0.2.2:9099/identitytoolkit.googleapis.com/v1/accounts:delete?key=$apiKey"
const val deleteAccountFirebase =
"http://10.0.2.2:9099/identitytoolkit.googleapis.com/v1/accounts:delete?key=$apiKey"
const val USER_PASSWORD = "LetMeIn123!"

View File

@@ -23,6 +23,7 @@ fun checkErrorMessage(expectedErrorText: String): Matcher<View?>? {
val error = view.error ?: return false
return expectedErrorText == error.toString()
}
override fun describeTo(d: Description?) {}
}
}

View File

@@ -10,7 +10,7 @@ import kotlinx.coroutines.tasks.await
import org.junit.After
import org.junit.BeforeClass
open class FirebaseTest<T : BaseActivity<*>>(
open class FirebaseTest<T : BaseActivity<*,*>>(
activity: Class<T>,
private val registered: Boolean = false,
private val signedIn: Boolean = false
@@ -62,7 +62,10 @@ open class FirebaseTest<T : BaseActivity<*>>(
suspend fun removeUser() {
try {
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.deleteProfile().await()
}
@@ -74,7 +77,7 @@ open class FirebaseTest<T : BaseActivity<*>>(
fun generateEmailAddress(): String {
val suffix = (1000..50000).random()
email ="test-${suffix}@test-account.com"
email = "test-${suffix}@test-account.com"
return email!!
}

View File

@@ -1,10 +1,10 @@
package h_mal.appttude.com.firebase
data class SignUpResponse(
val expiresIn: String? = null,
val kind: String? = null,
val idToken: String? = null,
val localId: String? = null,
val email: String? = null,
val refreshToken: String? = null
val expiresIn: String? = null,
val kind: String? = null,
val idToken: String? = null,
val localId: String? = null,
val email: String? = null,
val refreshToken: String? = null
)