diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/PwaTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/PwaTest.kt index 890f43a47d..169d01a3eb 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/PwaTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/PwaTest.kt @@ -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) } } diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/WebControlsTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/WebControlsTest.kt index c6225eef74..759220bac9 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/WebControlsTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/WebControlsTest.kt @@ -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) } } diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt index d13d3c3c13..751f627a17 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt @@ -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(