diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt index b2b5a16eb..92c34e5ea 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt @@ -10,7 +10,6 @@ import androidx.test.uiautomator.UiDevice import okhttp3.mockwebserver.MockWebServer import org.junit.After import org.junit.Before -import org.junit.Ignore import org.junit.Rule import org.junit.Test import org.mozilla.fenix.customannotations.SmokeTest @@ -406,7 +405,6 @@ class CollectionTest { } @Test - @Ignore("Failing after compose migration. See: https://github.com/mozilla-mobile/fenix/issues/26087") fun selectTabOnLongTapTest() { val firstWebPage = getGenericAsset(mockWebServer, 1) val secondWebPage = getGenericAsset(mockWebServer, 2) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt index 15463a72a..5d7fee504 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt @@ -37,6 +37,10 @@ import org.hamcrest.CoreMatchers.anyOf import org.hamcrest.CoreMatchers.containsString import org.hamcrest.Matcher import org.mozilla.fenix.R +import org.mozilla.fenix.helpers.Constants.LONG_CLICK_DURATION +import org.mozilla.fenix.helpers.MatcherHelper.assertItemWithResIdAndTextExists +import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText +import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndDescription import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeLong @@ -191,10 +195,11 @@ class TabDrawerRobot { waitingTime, ) - tab(title).also { - it.waitForExists(waitingTime) - it.longClick() - } + mDevice.findObject( + By + .textContains(title) + .res("$packageName:id/mozac_browser_tabstray_title"), + ).click(LONG_CLICK_DURATION) } fun createCollection( @@ -215,12 +220,11 @@ class TabDrawerRobot { } } - fun verifyTabsMultiSelectionCounter(numOfTabs: Int) { - assertTrue( - mDevice.findObject(UiSelector().text("$numOfTabs selected")) - .waitForExists(waitingTime), + fun verifyTabsMultiSelectionCounter(numOfTabs: Int) = + assertItemWithResIdAndTextExists( + itemWithResId("$packageName:id/multiselect_title"), + itemContainingText("$numOfTabs selected"), ) - } class Transition { fun openThreeDotMenu(interact: ThreeDotMenuMainRobot.() -> Unit): ThreeDotMenuMainRobot.Transition {