From 75982cedf0d504c80a3ca76b4b60067146c579bf Mon Sep 17 00:00:00 2001 From: Quentin Monnier Date: Wed, 1 Feb 2023 11:10:45 +0000 Subject: [PATCH] some fixes --- README.md | 2 +- app/build.gradle | 1 - .../java/org/linphone/call/IncomingCallPushUITests.kt | 2 -- .../androidTest/java/org/linphone/call/IncomingCallUITests.kt | 3 --- .../androidTest/java/org/linphone/call/OutgoingCallUITests.kt | 2 -- .../java/org/linphone/methods/UITestsCoreManager.kt | 3 +-- 6 files changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 770ffd48a..1fc207d5e 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ If you don't have Android Studio, you can run : ./gradlew connectedAndroidTest -Android Instrumented UI tests wiki : https://wiki.linphone.org/xwiki/wiki/public/view/Linphone/ +Android Instrumented UI tests wiki : https://wiki.linphone.org/xwiki/bin/view/Engineering/Android%20UI%20Tests%20with%20Android%20Studio/ # CONTRIBUTIONS diff --git a/app/build.gradle b/app/build.gradle index cc8d5b1d1..aa9abf99f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -263,7 +263,6 @@ dependencies { debugImplementation 'androidx.test.ext:junit-ktx:1.1.4' debugImplementation 'androidx.test.espresso:espresso-core:3.4.0' - debugImplementation 'androidx.test.espresso:espresso-idling-resource:3.4.0' debugImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' } diff --git a/app/src/androidTest/java/org/linphone/call/IncomingCallPushUITests.kt b/app/src/androidTest/java/org/linphone/call/IncomingCallPushUITests.kt index ca200bc77..9c517f209 100644 --- a/app/src/androidTest/java/org/linphone/call/IncomingCallPushUITests.kt +++ b/app/src/androidTest/java/org/linphone/call/IncomingCallPushUITests.kt @@ -1,7 +1,6 @@ package org.linphone.call import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.filters.LargeTest import org.junit.After import org.junit.Before import org.junit.Rule @@ -13,7 +12,6 @@ import org.linphone.methods.UITestsScreenshots.takeScreenshot import org.linphone.utils.AppUtils.Companion.getString @RunWith(AndroidJUnit4::class) -@LargeTest class IncomingCallPushUITests { val methods = CallViewUITestsMethods diff --git a/app/src/androidTest/java/org/linphone/call/IncomingCallUITests.kt b/app/src/androidTest/java/org/linphone/call/IncomingCallUITests.kt index 63f86ecd6..0462a7b08 100644 --- a/app/src/androidTest/java/org/linphone/call/IncomingCallUITests.kt +++ b/app/src/androidTest/java/org/linphone/call/IncomingCallUITests.kt @@ -6,7 +6,6 @@ import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.matcher.ViewMatchers import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.filters.LargeTest import java.util.* import org.junit.After import org.junit.Before @@ -17,10 +16,8 @@ import org.linphone.R import org.linphone.methods.* import org.linphone.methods.UITestsScreenshots.takeScreenshot import org.linphone.methods.UITestsUtils.checkWithTimeout -import org.linphone.utils.AppUtils.Companion.getString @RunWith(AndroidJUnit4::class) -@LargeTest class IncomingCallUITests { val methods = CallViewUITestsMethods diff --git a/app/src/androidTest/java/org/linphone/call/OutgoingCallUITests.kt b/app/src/androidTest/java/org/linphone/call/OutgoingCallUITests.kt index 0a2db3696..df850769d 100644 --- a/app/src/androidTest/java/org/linphone/call/OutgoingCallUITests.kt +++ b/app/src/androidTest/java/org/linphone/call/OutgoingCallUITests.kt @@ -5,7 +5,6 @@ import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.assertion.ViewAssertions.doesNotExist import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.filters.LargeTest import org.junit.After import org.junit.Before import org.junit.Rule @@ -17,7 +16,6 @@ import org.linphone.methods.UITestsScreenshots.takeScreenshot import org.linphone.methods.UITestsUtils.checkWithTimeout @RunWith(AndroidJUnit4::class) -@LargeTest class OutgoingCallUITests { val methods = CallViewUITestsMethods diff --git a/app/src/androidTest/java/org/linphone/methods/UITestsCoreManager.kt b/app/src/androidTest/java/org/linphone/methods/UITestsCoreManager.kt index d354ebff7..7607f65f9 100644 --- a/app/src/androidTest/java/org/linphone/methods/UITestsCoreManager.kt +++ b/app/src/androidTest/java/org/linphone/methods/UITestsCoreManager.kt @@ -61,7 +61,7 @@ class UITestsCoreManager { accountCreator.domain = "sip.example.org" accountCreator.email = accountCreator.username + "@" + accountCreator.domain accountCreator.transport = TransportType.Tcp - accountCreator.createAccount() + assert(accountCreator.createAccount() == AccountCreator.Status.RequestOk) { "[UITests] Unable to send a request to create an account on server" } waitForAccountCreationStatus(AccountCreator.Status.AccountCreated, 5.0) val authInfo = factory.createAuthInfo(accountCreator.username!!, "", accountCreator.password, "", "", accountCreator.domain) @@ -92,7 +92,6 @@ class UITestsCoreManager { ) { super.onCreateAccount(creator, status, response) if (wStatus == status) { - Log.d("dsqdfs", status.ordinal) result = true wait.cancel() }