For #27714 fix disabled sponsored shortcut UI tests

This commit is contained in:
AndiAJ 2022-11-08 13:55:29 +02:00 committed by mergify[bot]
parent ba5ee133dc
commit 8fa230a78e
2 changed files with 3 additions and 9 deletions

View File

@ -9,7 +9,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.R
@ -236,7 +235,6 @@ class TopSitesTest {
@SmokeTest
@Test
@Ignore("Design was reverted: https://github.com/mozilla-mobile/fenix/issues/27714")
fun verifySponsoredShortcutsListTest() {
homeScreen {
var sponsoredShortcutTitle = getSponsoredShortcutTitle(2)
@ -255,7 +253,6 @@ class TopSitesTest {
}
@Test
@Ignore("Design was reverted: https://github.com/mozilla-mobile/fenix/issues/27714")
fun openSponsoredShortcutTest() {
var sponsoredShortcutTitle = ""
@ -267,7 +264,6 @@ class TopSitesTest {
}
@Test
@Ignore("Design was reverted: https://github.com/mozilla-mobile/fenix/issues/27714")
fun openSponsoredShortcutInPrivateBrowsingTest() {
var sponsoredShortcutTitle = ""
@ -280,7 +276,6 @@ class TopSitesTest {
}
@Test
@Ignore("Design was reverted: https://github.com/mozilla-mobile/fenix/issues/27714")
fun verifySponsoredShortcutsSponsorsAndPrivacyOptionTest() {
var sponsoredShortcutTitle = ""
@ -293,7 +288,6 @@ class TopSitesTest {
}
@Test
@Ignore("Design was reverted: https://github.com/mozilla-mobile/fenix/issues/27714")
fun verifySponsoredShortcutsSettingsOptionTest() {
var sponsoredShortcutTitle = ""

View File

@ -314,7 +314,7 @@ class HomeScreenRobot {
fun getSponsoredShortcutTitle(position: Int): String {
val sponsoredShortcut = mDevice.findObject(
UiSelector()
.className("android.widget.FrameLayout")
.resourceId("$packageName:id/top_site_item")
.index(position - 1),
).getChild(
UiSelector()
@ -843,7 +843,7 @@ private fun assertSponsoredSubtitleIsDisplayed(position: Int) =
assertTrue(
mDevice.findObject(
UiSelector()
.className("android.widget.FrameLayout")
.resourceId("$packageName:id/top_site_item")
.index(position - 1),
).getChild(
UiSelector()
@ -855,7 +855,7 @@ private fun assertSponsoredShortcutTitle(sponsoredShortcutTitle: String, positio
assertTrue(
mDevice.findObject(
UiSelector()
.className("android.widget.FrameLayout")
.resourceId("$packageName:id/top_site_item")
.index(position - 1),
).getChild(
UiSelector()