Bug 1807270 - Re-enable selectTabOnLongTapTest UI test

fenix/114.1.0
AndiAJ 1 year ago committed by mergify[bot]
parent 0732299760
commit ee91754ccb

@ -10,7 +10,6 @@ import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer import okhttp3.mockwebserver.MockWebServer
import org.junit.After import org.junit.After
import org.junit.Before import org.junit.Before
import org.junit.Ignore
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest import org.mozilla.fenix.customannotations.SmokeTest
@ -406,7 +405,6 @@ class CollectionTest {
} }
@Test @Test
@Ignore("Failing after compose migration. See: https://github.com/mozilla-mobile/fenix/issues/26087")
fun selectTabOnLongTapTest() { fun selectTabOnLongTapTest() {
val firstWebPage = getGenericAsset(mockWebServer, 1) val firstWebPage = getGenericAsset(mockWebServer, 1)
val secondWebPage = getGenericAsset(mockWebServer, 2) val secondWebPage = getGenericAsset(mockWebServer, 2)

@ -37,6 +37,10 @@ import org.hamcrest.CoreMatchers.anyOf
import org.hamcrest.CoreMatchers.containsString import org.hamcrest.CoreMatchers.containsString
import org.hamcrest.Matcher import org.hamcrest.Matcher
import org.mozilla.fenix.R 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.MatcherHelper.itemWithResIdAndDescription
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeLong import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeLong
@ -191,10 +195,11 @@ class TabDrawerRobot {
waitingTime, waitingTime,
) )
tab(title).also { mDevice.findObject(
it.waitForExists(waitingTime) By
it.longClick() .textContains(title)
} .res("$packageName:id/mozac_browser_tabstray_title"),
).click(LONG_CLICK_DURATION)
} }
fun createCollection( fun createCollection(
@ -215,12 +220,11 @@ class TabDrawerRobot {
} }
} }
fun verifyTabsMultiSelectionCounter(numOfTabs: Int) { fun verifyTabsMultiSelectionCounter(numOfTabs: Int) =
assertTrue( assertItemWithResIdAndTextExists(
mDevice.findObject(UiSelector().text("$numOfTabs selected")) itemWithResId("$packageName:id/multiselect_title"),
.waitForExists(waitingTime), itemContainingText("$numOfTabs selected"),
) )
}
class Transition { class Transition {
fun openThreeDotMenu(interact: ThreeDotMenuMainRobot.() -> Unit): ThreeDotMenuMainRobot.Transition { fun openThreeDotMenu(interact: ThreeDotMenuMainRobot.() -> Unit): ThreeDotMenuMainRobot.Transition {

Loading…
Cancel
Save