From f159b1a8923dd8c40def280b18cc660508a202be Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Mon, 19 Aug 2024 13:42:13 +1000 Subject: [PATCH] Removing unsed UI tests We need to rethink the UI tests if we do indeed want to use them as they are not tied to the existing flow anymore --- .../java/network/loki/messenger/HomeActivityTests.kt | 12 ++++++++---- .../messenger/libsession_util/InstrumentedTests.kt | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/androidTest/java/network/loki/messenger/HomeActivityTests.kt b/app/src/androidTest/java/network/loki/messenger/HomeActivityTests.kt index af1d8f6d22..2f3ba9fb10 100644 --- a/app/src/androidTest/java/network/loki/messenger/HomeActivityTests.kt +++ b/app/src/androidTest/java/network/loki/messenger/HomeActivityTests.kt @@ -42,6 +42,10 @@ import org.thoughtcrime.securesms.conversation.v2.input_bar.InputBar import org.thoughtcrime.securesms.home.HomeActivity import com.bumptech.glide.Glide +/** + * Currently not used as part of our CI/Deployment processes !!!! + */ + @RunWith(AndroidJUnit4::class) @LargeTest class HomeActivityTests { @@ -107,7 +111,7 @@ class HomeActivityTests { } - private fun goToMyChat() { +/* private fun goToMyChat() { onView(withId(R.id.newConversationButton)).perform(ViewActions.click()) onView(withId(R.id.createPrivateChatButton)).perform(ViewActions.click()) // new chat @@ -122,7 +126,7 @@ class HomeActivityTests { onView(withId(R.id.publicKeyEditText)).perform(ViewActions.typeText(copied)) onView(withId(R.id.publicKeyEditText)).perform(ViewActions.closeSoftKeyboard()) onView(withId(R.id.createPrivateChatButton)).perform(ViewActions.click()) - } + }*/ @Test fun testLaunches_dismiss_seedView() { @@ -145,7 +149,7 @@ class HomeActivityTests { onView(withId(R.id.seedReminderView)).check(matches(not(isDisplayed()))) } - @Test +/* @Test fun testChat_withSelf() { setupLoggedInState() goToMyChat() @@ -176,7 +180,7 @@ class HomeActivityTests { onView(isRoot()).perform(waitFor(1000)) // no other way for this to work apparently onView(withText(dialogPromptText)).check(matches(isDisplayed())) - } + }*/ /** * Perform action of waiting for a specific time. diff --git a/libsession-util/src/androidTest/java/network/loki/messenger/libsession_util/InstrumentedTests.kt b/libsession-util/src/androidTest/java/network/loki/messenger/libsession_util/InstrumentedTests.kt index 2c75de50ce..4f569060f9 100644 --- a/libsession-util/src/androidTest/java/network/loki/messenger/libsession_util/InstrumentedTests.kt +++ b/libsession-util/src/androidTest/java/network/loki/messenger/libsession_util/InstrumentedTests.kt @@ -551,6 +551,7 @@ class InstrumentedTests { is Conversation.OneToOne -> seen.add("1-to-1: ${convo.accountId}") is Conversation.Community -> seen.add("og: ${convo.baseCommunityInfo.baseUrl}/r/${convo.baseCommunityInfo.room}") is Conversation.LegacyGroup -> seen.add("cl: ${convo.groupId}") + null -> { /* ignore null cases */ } } }