Issue#13 Fix codeAnalysis errors
This commit is contained in:
parent
5d89e62356
commit
f248ab1081
6 changed files with 6 additions and 8 deletions
|
|
@ -3,7 +3,7 @@ package org.fnives.test.showcase.testutils
|
|||
import android.app.Activity
|
||||
import androidx.test.core.app.ActivityScenario
|
||||
|
||||
fun <T: Activity> ActivityScenario<T>.safeClose() {
|
||||
fun <T : Activity> ActivityScenario<T>.safeClose() {
|
||||
workaroundForActivityScenarioCLoseLockingUp()
|
||||
close()
|
||||
}
|
||||
|
|
@ -19,4 +19,4 @@ fun <T: Activity> ActivityScenario<T>.safeClose() {
|
|||
*/
|
||||
private fun workaroundForActivityScenarioCLoseLockingUp() {
|
||||
Thread.sleep(1000L)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ class MockServerScenarioSetupResetingTestRule(
|
|||
.sslSocketFactory(handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager)
|
||||
.build()
|
||||
|
||||
|
||||
private fun after() {
|
||||
mockServerScenarioSetup.stop()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ interface SnackbarVerificationHelper : TestRule {
|
|||
}
|
||||
|
||||
@Suppress("TestFunctionName")
|
||||
fun SnackbarVerificationTestRule(): SnackbarVerificationHelper=
|
||||
SpecificTestConfigurationsFactory.createSnackbarVerification()
|
||||
fun SnackbarVerificationTestRule(): SnackbarVerificationHelper =
|
||||
SpecificTestConfigurationsFactory.createSnackbarVerification()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ class NetworkSynchronizationTestRule : TestRule, KoinTest {
|
|||
dispose()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ fun loopMainThreadUntilIdleWithIdlingResources() {
|
|||
}
|
||||
|
||||
fun loopMainThreadFor(delay: Long) {
|
||||
if (Looper.getMainLooper().isCurrentThread){
|
||||
if (Looper.getMainLooper().isCurrentThread) {
|
||||
Thread.sleep(200L)
|
||||
} else {
|
||||
Espresso.onView(ViewMatchers.isRoot()).perform(LoopMainThreadFor(delay))
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@ class ReplaceProgressBarDrawableToStatic : ViewAction {
|
|||
progressBar.indeterminateDrawable = ColorDrawable(Color.GREEN)
|
||||
uiController.loopMainThreadUntilIdle()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue