tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit e70e0aad471b32c62503c2b71315e11e1c705124
parent 2dbf29e59b81be42c9c0bb8692ac796ada97d371
Author: AndiAJ <andiaj@users.noreply.github.com>
Date:   Fri,  3 Oct 2025 20:55:01 +0000

Bug 1988568 - Fix disabled collections related UI tests r=aaronmt

The tests were disabled a couple of days ago as part of 1984836

After the update, the swipe left/right actions weren't properly performed on the collections tabs.
Managed to fix it by using UIObject2 instead of UIObject when performing the swipe actions.

All 3 UI tests successfully passed 50x on Firebase ✅

Differential Revision: https://phabricator.services.mozilla.com/D267421

Diffstat:
Mmobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt | 4----
Mmobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/CollectionRobot.kt | 9+++++++--
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt @@ -5,7 +5,6 @@ package org.mozilla.fenix.ui import androidx.compose.ui.test.junit4.AndroidComposeTestRule -import org.junit.Ignore import org.junit.Rule import org.junit.Test import org.mozilla.fenix.customannotations.SmokeTest @@ -349,7 +348,6 @@ class CollectionTest : TestSetup() { } // TestRail link: https://mozilla.testrail.io/index.php?/cases/view/343427 - @Ignore("https://bugzilla.mozilla.org/show_bug.cgi?id=1988568") @Test fun removeTabFromCollectionUsingSwipeLeftActionTest() { val testPage1 = getGenericAsset(mockWebServer, 1) @@ -373,7 +371,6 @@ class CollectionTest : TestSetup() { } // TestRail link: https://mozilla.testrail.io/index.php?/cases/view/991278 - @Ignore("https://bugzilla.mozilla.org/show_bug.cgi?id=1988568") @Test fun removeTabFromCollectionUsingSwipeRightActionTest() { val testPage1 = getGenericAsset(mockWebServer, 1) @@ -397,7 +394,6 @@ class CollectionTest : TestSetup() { } // TestRail link: https://mozilla.testrail.io/index.php?/cases/view/3080080 - @Ignore("https://bugzilla.mozilla.org/show_bug.cgi?id=1988568") @Test fun removeLastTabFromCollectionUsingSwipeActionTest() { val testPage = getGenericAsset(mockWebServer, 1) diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/CollectionRobot.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/CollectionRobot.kt @@ -21,6 +21,7 @@ import androidx.test.espresso.action.ViewActions.pressImeActionButton import androidx.test.espresso.matcher.RootMatchers import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.uiautomator.By +import androidx.test.uiautomator.Direction import androidx.test.uiautomator.UiSelector import androidx.test.uiautomator.Until import org.mozilla.fenix.R @@ -225,12 +226,16 @@ class CollectionRobot { } fun swipeTabLeft(title: String) { - itemContainingText(title).swipeLeft(6) + Log.i(TAG, "swipeTabLeft: Trying to swipe left the collections tab with title: $title") + mDevice.findObject(By.textContains(title)).swipe(Direction.LEFT, 1.0f, 1000) + Log.i(TAG, "swipeTabLeft: Swiped left the collections tab with title: $title") waitForAppWindowToBeUpdated() } fun swipeTabRight(title: String) { - itemContainingText(title).swipeRight(6) + Log.i(TAG, "swipeTabRight: Trying to swipe right the collections tab with title: $title") + mDevice.findObject(By.textContains(title)).swipe(Direction.RIGHT, 1.0f, 1000) + Log.i(TAG, "swipeTabRight: Swiped right the collections tab with title: $title") waitForAppWindowToBeUpdated() }