diff --git a/app/build.gradle b/app/build.gradle
index 86b818748..1887e7b72 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -256,13 +256,13 @@ dependencies {
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
// UITests dependencies
- implementation 'androidx.test:rules:1.5.0'
- debugImplementation 'androidx.test:runner:1.5.2'
- debugImplementation 'androidx.test:core:1.5.0'
- debugImplementation 'androidx.test.ext:junit-ktx:1.1.5'
-
- debugImplementation 'androidx.test.espresso:espresso-core:3.5.1'
- debugImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
+ androidTestImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test:rules:1.5.0'
+ androidTestImplementation 'androidx.test:runner:1.5.2'
+ androidTestImplementation 'androidx.test:core:1.5.0'
+ androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.5'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
+ androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
}
task generateContactsXml(type: Copy) {
@@ -445,7 +445,7 @@ def embedScreenshotsTask = task('embedScreenshots', group: 'reporting') {
def imagesrc = new File("failures", failedTestClassName + File.separator + failedTestName + File.separator + failedTestCaseDescription).toString()
- screenshotReport += "display conficts detected with \'${name}\' line ${line}:\n
\n"
+ screenshotReport += "display conflicts detected with \'${name}\' line ${line}:\n
\n"
def insertIndex = failedTestJunitReportContent.indexOf("", failedTestIndex)
def firstPart = failedTestJunitReportContent.substring(0, insertIndex)
diff --git a/app/src/androidTest/java/org/linphone/call/IncomingCallPushUITests.kt b/app/src/androidTest/java/org/linphone/call/IncomingCallPushUITests.kt
index 9c517f209..8f8280c48 100644
--- a/app/src/androidTest/java/org/linphone/call/IncomingCallPushUITests.kt
+++ b/app/src/androidTest/java/org/linphone/call/IncomingCallPushUITests.kt
@@ -56,7 +56,7 @@ class IncomingCallPushUITests {
@Test
fun testDecline() {
methods.onPushAction("Decline", null)
- methods.waitForCallNotification(false, 5.0)
+ methods.waitForCallNotification(false, 10.0)
takeScreenshot("dialer_view")
}
diff --git a/app/src/androidTest/java/org/linphone/methods/CallViewUITestsMethods.kt b/app/src/androidTest/java/org/linphone/methods/CallViewUITestsMethods.kt
index 999e38bc4..b9598c511 100644
--- a/app/src/androidTest/java/org/linphone/methods/CallViewUITestsMethods.kt
+++ b/app/src/androidTest/java/org/linphone/methods/CallViewUITestsMethods.kt
@@ -24,6 +24,7 @@ import org.linphone.methods.UITestsUtils.checkWithTimeout
import org.linphone.utils.AppUtils.Companion.getString
object CallViewUITestsMethods {
+ const val TIMEOUT = 10.0
val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
val manager = UITestsCoreManager.instance
@@ -42,8 +43,8 @@ object CallViewUITestsMethods {
ghostAccount.startCall(manager.createAddress(appAccountAuthInfo))
startCallTime = Date().time
- ghostAccount.waitForCallState(Call.State.OutgoingRinging, 5.0)
- waitForCallNotification(true, 5.0)
+ ghostAccount.waitForCallState(Call.State.OutgoingRinging, TIMEOUT)
+ waitForCallNotification(true, TIMEOUT)
}
fun startOutgoingCall() {
@@ -53,8 +54,8 @@ object CallViewUITestsMethods {
onView(withContentDescription(R.string.content_description_start_call)).perform(click())
startCallTime = Date().time
- UITestsView.outgoingCallView.checkWithTimeout(matches(isDisplayed()), 5.0)
- ghostAccount.waitForCallState(Call.State.IncomingReceived, 5.0)
+ UITestsView.outgoingCallView.checkWithTimeout(matches(isDisplayed()), TIMEOUT)
+ ghostAccount.waitForCallState(Call.State.IncomingReceived, TIMEOUT)
}
fun endCall(currentView: ViewInteraction? = null) {
@@ -67,7 +68,7 @@ object CallViewUITestsMethods {
}
fun checkCallTime(view: ViewInteraction, launchTime: Long = Date().time) = runBlocking {
- view.checkWithTimeout(matches(isDisplayed()), 5.0)
+ view.checkWithTimeout(matches(isDisplayed()), TIMEOUT)
val firstValue = ((Date().time - launchTime) / 1000).toInt() + 1
val wait = launch(Dispatchers.Default) {
val timerArray = arrayListOf()
@@ -85,7 +86,7 @@ object CallViewUITestsMethods {
wait.join()
}
- fun onPushAction(label: String, resultingView: ViewInteraction?, timeout: Double = 5.0) {
+ fun onPushAction(label: String, resultingView: ViewInteraction?, timeout: Double = TIMEOUT) {
try {
val button = device.findObject(By.textContains(label))
button.click()
@@ -103,7 +104,7 @@ object CallViewUITestsMethods {
) {
onView(withId(id)).checkWithTimeout(matches(isDisplayed()), timeout)
onView(withId(id)).perform(click())
- resultingView?.checkWithTimeout(assertion, 5.0)
+ resultingView?.checkWithTimeout(assertion, TIMEOUT)
}
fun waitForCallNotification(exist: Boolean, timeout: Double) = runBlocking {
diff --git a/app/src/androidTest/java/org/linphone/methods/UITestsCoreManager.kt b/app/src/androidTest/java/org/linphone/methods/UITestsCoreManager.kt
index ed24bb03b..b20bee99b 100644
--- a/app/src/androidTest/java/org/linphone/methods/UITestsCoreManager.kt
+++ b/app/src/androidTest/java/org/linphone/methods/UITestsCoreManager.kt
@@ -62,7 +62,7 @@ class UITestsCoreManager {
accountCreator.email = accountCreator.username + "@" + accountCreator.domain
accountCreator.transport = TransportType.Tcp
assert(accountCreator.createAccount() == AccountCreator.Status.RequestOk) { "[UITests] Unable to send a request to create an account on server" }
- waitForAccountCreationStatus(AccountCreator.Status.AccountCreated, 5.0)
+ waitForAccountCreationStatus(AccountCreator.Status.AccountCreated, 10.0)
val authInfo = factory.createAuthInfo(accountCreator.username!!, "", accountCreator.password, "", "", accountCreator.domain)
core.addAuthInfo(authInfo)
diff --git a/app/src/androidTest/java/org/linphone/methods/UITestsUtils.kt b/app/src/androidTest/java/org/linphone/methods/UITestsUtils.kt
index ac91b684d..61c943b53 100644
--- a/app/src/androidTest/java/org/linphone/methods/UITestsUtils.kt
+++ b/app/src/androidTest/java/org/linphone/methods/UITestsUtils.kt
@@ -131,7 +131,7 @@ object UITestsUtils {
connectAccount()
assert(accountIsConnected()) { "registration state on the Status Bar is still not : Connected after 10 seconds" }
}
- UITestsView.dialerView.checkWithTimeout(matches(isDisplayed()), 5.0)
+ UITestsView.dialerView.checkWithTimeout(matches(isDisplayed()), 10.0)
}
fun launchApp() {