[fenix] For https://github.com/mozilla-mobile/fenix/issues/24508 re-enable private browsing UI tests

pull/600/head
AndiAJ 2 years ago committed by mergify[bot]
parent 4d3aa719fa
commit 71b31bd1fc

@ -104,7 +104,6 @@ class CrashReportingTest {
} }
} }
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/24508")
@SmokeTest @SmokeTest
@Test @Test
fun privateBrowsingUseAppWhileTabIsCrashedTest() { fun privateBrowsingUseAppWhileTabIsCrashedTest() {

@ -8,7 +8,6 @@ import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.By import androidx.test.uiautomator.By
import androidx.test.uiautomator.UiDevice import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.Until import androidx.test.uiautomator.Until
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
@ -61,7 +60,6 @@ class HomeScreenTest {
} }
} }
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/24508")
@Test @Test
fun privateModeScreenItemsTest() { fun privateModeScreenItemsTest() {
homeScreen { }.dismissOnboarding() homeScreen { }.dismissOnboarding()

@ -932,7 +932,6 @@ class SmokeTest {
} }
} }
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/24508")
@Test @Test
fun addPrivateBrowsingShortcutTest() { fun addPrivateBrowsingShortcutTest() {
homeScreen { homeScreen {

@ -333,7 +333,6 @@ class TabbedBrowsingTest {
} }
} }
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/24508")
@Test @Test
fun verifyContextMenuShortcuts() { fun verifyContextMenuShortcuts() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1) val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)

@ -374,8 +374,12 @@ class HomeScreenRobot {
} }
fun openCommonMythsLink(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition { fun openCommonMythsLink(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition {
onView(withText(R.string.private_browsing_common_myths)) mDevice.findObject(
.perform(click()) UiSelector()
.textContains(
getStringResource(R.string.private_browsing_common_myths)
)
).also { it.click() }
BrowserRobot().interact() BrowserRobot().interact()
return BrowserRobot.Transition() return BrowserRobot.Transition()
@ -633,8 +637,14 @@ private fun assertTakePlacementBottomRadioButton() {
} }
private fun assertPrivateSessionMessage() = private fun assertPrivateSessionMessage() =
onView(withText(R.string.private_browsing_common_myths)) assertTrue(
.check(matches(withEffectiveVisibility(Visibility.VISIBLE))) mDevice.findObject(
UiSelector()
.textContains(
getStringResource(R.string.private_browsing_common_myths)
)
).waitForExists(waitingTime)
)
private fun collectionTitle(title: String) = private fun collectionTitle(title: String) =
onView(allOf(withId(R.id.collection_title), withText(title))) onView(allOf(withId(R.id.collection_title), withText(title)))

Loading…
Cancel
Save