[fenix] Bug 1814283 - re-enable app link related UI tests

pull/600/head
AndiAJ 2 years ago committed by mergify[bot]
parent 70cf33b019
commit 733095355c

@ -63,7 +63,6 @@ class PwaTest {
}
}
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1814283")
@SmokeTest
@Test
fun telephoneLinkPWATest() {
@ -76,6 +75,7 @@ class PwaTest {
clickAddAutomaticallyButton()
}.openHomeScreenShortcut(shortcutTitle) {
clickLinkMatchingText("Telephone link")
clickOpenInAppPromptButton()
assertNativeAppOpens(PHONE_APP, phoneLink)
}
}

@ -7,7 +7,6 @@ package org.mozilla.fenix.ui
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.helpers.AndroidAssetDispatcher
@ -164,7 +163,6 @@ class WebControlsTest {
}
}
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1814283")
@Test
fun emailLinkTest() {
val externalLinksPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
@ -172,11 +170,11 @@ class WebControlsTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(externalLinksPage.url) {
clickLinkMatchingText("Email link")
clickOpenInAppPromptButton()
assertNativeAppOpens(Constants.PackageName.GMAIL_APP, emailLink)
}
}
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1814283")
@Test
fun telephoneLinkTest() {
val externalLinksPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
@ -184,6 +182,7 @@ class WebControlsTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(externalLinksPage.url) {
clickLinkMatchingText("Telephone link")
clickOpenInAppPromptButton()
assertNativeAppOpens(Constants.PackageName.PHONE_APP, phoneLink)
}
}

@ -47,6 +47,7 @@ import org.mozilla.fenix.helpers.Constants.RETRY_COUNT
import org.mozilla.fenix.helpers.MatcherHelper
import org.mozilla.fenix.helpers.MatcherHelper.assertItemWithResIdExists
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
import org.mozilla.fenix.helpers.SessionLoadedIdlingResource
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeLong
@ -947,6 +948,13 @@ class BrowserRobot {
it.click()
}
fun clickOpenInAppPromptButton() =
itemWithResIdAndText("android:id/button1", "OPEN")
.also {
it.waitForExists(waitingTime)
it.click()
}
class Transition {
private fun threeDotButton() = onView(
allOf(

Loading…
Cancel
Save