Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
[fenix] For mozilla-mobile/fenix#27714 fix disabled sponsored shortcu…
Browse files Browse the repository at this point in the history
…t UI tests
  • Loading branch information
AndiAJ authored and mergify[bot] committed Nov 9, 2022
1 parent 5bc980f commit 9b795ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -255,7 +253,6 @@ class TopSitesTest {
}

@Test
@Ignore("Design was reverted: https://github.com/mozilla-mobile/fenix/issues/27714")
fun openSponsoredShortcutTest() {
var sponsoredShortcutTitle = ""

Expand All @@ -267,7 +264,6 @@ class TopSitesTest {
}

@Test
@Ignore("Design was reverted: https://github.com/mozilla-mobile/fenix/issues/27714")
fun openSponsoredShortcutInPrivateBrowsingTest() {
var sponsoredShortcutTitle = ""

Expand All @@ -280,7 +276,6 @@ class TopSitesTest {
}

@Test
@Ignore("Design was reverted: https://github.com/mozilla-mobile/fenix/issues/27714")
fun verifySponsoredShortcutsSponsorsAndPrivacyOptionTest() {
var sponsoredShortcutTitle = ""

Expand All @@ -293,7 +288,6 @@ class TopSitesTest {
}

@Test
@Ignore("Design was reverted: https://github.com/mozilla-mobile/fenix/issues/27714")
fun verifySponsoredShortcutsSettingsOptionTest() {
var sponsoredShortcutTitle = ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 9b795ec

Please sign in to comment.