From 787df842e0b4a5eec97a1df77bbf5dd46541743e Mon Sep 17 00:00:00 2001 From: AndiAJ Date: Thu, 19 Oct 2023 14:31:40 +0300 Subject: [PATCH] Bug 1860052 - Custom tabs TestRail matching --- .../java/org/mozilla/fenix/ui/CustomTabsTest.kt | 74 ++++++---------------- 1 file changed, 19 insertions(+), 55 deletions(-) diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/CustomTabsTest.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/CustomTabsTest.kt index 103e0af44cbd..014fd09ace30 100644 --- a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/CustomTabsTest.kt +++ b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/CustomTabsTest.kt @@ -21,7 +21,6 @@ import org.mozilla.fenix.customannotations.SmokeTest import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.FeatureSettingsHelperDelegate import org.mozilla.fenix.helpers.HomeActivityIntentTestRule -import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText import org.mozilla.fenix.helpers.MatcherHelper.itemWithText import org.mozilla.fenix.helpers.TestAssetHelper @@ -33,7 +32,6 @@ import org.mozilla.fenix.ui.robots.clickPageObject import org.mozilla.fenix.ui.robots.customTabScreen import org.mozilla.fenix.ui.robots.enhancedTrackingProtection import org.mozilla.fenix.ui.robots.homeScreen -import org.mozilla.fenix.ui.robots.longClickPageObject import org.mozilla.fenix.ui.robots.navigationToolbar import org.mozilla.fenix.ui.robots.notificationShade import org.mozilla.fenix.ui.robots.openEditURLView @@ -78,29 +76,10 @@ class CustomTabsTest { featureSettingsHelper.resetAllFeatureFlags() } + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/249659 @SmokeTest @Test - fun customTabsOpenExternalLinkTest() { - val externalLinkURL = "https://mozilla-mobile.github.io/testapp/downloads" - - intentReceiverActivityTestRule.launchActivity( - createCustomTabIntent( - externalLinksPWAPage.toUri().toString(), - customMenuItem, - ), - ) - - customTabScreen { - waitForPageToLoad() - clickPageObject(itemContainingText("External link")) - waitForPageToLoad() - verifyCustomTabToolbarTitle(externalLinkURL) - } - } - - @SmokeTest - @Test - fun customTabsSaveLoginTest() { + fun verifyLoginSaveInCustomTabTest() { intentReceiverActivityTestRule.launchActivity( createCustomTabIntent( loginPage.toUri().toString(), @@ -131,9 +110,9 @@ class CustomTabsTest { } } - @SmokeTest + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2334762 @Test - fun customTabCopyToolbarUrlTest() { + fun copyCustomTabToolbarUrlTest() { val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 1) intentReceiverActivityTestRule.launchActivity( @@ -161,33 +140,11 @@ class CustomTabsTest { } } - @SmokeTest - @Test - fun customTabShareTextTest() { - val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 1) - - intentReceiverActivityTestRule.launchActivity( - createCustomTabIntent( - customTabPage.url.toString(), - customMenuItem, - ), - ) - - customTabScreen { - waitForPageToLoad() - } - - browserScreen { - longClickPageObject(itemContainingText("content")) - }.clickShareSelectedText { - verifyAndroidShareLayout() - } - } - + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2334761 @Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1807289") @SmokeTest @Test - fun customTabDownloadTest() { + fun verifyDownloadInACustomTabTest() { val customTabPage = "https://storage.googleapis.com/mobile_test_assets/test_app/downloads.html" val downloadFile = "web_icon.png" @@ -214,10 +171,11 @@ class CustomTabsTest { } } + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/249644 // Verifies the main menu of a custom tab with a custom menu item @SmokeTest @Test - fun customTabMenuItemsTest() { + fun verifyCustomTabMenuItemsTest() { val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 1) intentReceiverActivityTestRule.launchActivity( @@ -241,9 +199,11 @@ class CustomTabsTest { } } + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/249645 // The test opens a link in a custom tab then sends it to the browser + @SmokeTest @Test - fun openCustomTabInBrowserTest() { + fun openCustomTabInFirefoxTest() { val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 1) intentReceiverActivityTestRule.launchActivity( @@ -260,8 +220,9 @@ class CustomTabsTest { } } + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2239548 @Test - fun shareCustomTabTest() { + fun shareCustomTabUsingToolbarButtonTest() { val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 1) intentReceiverActivityTestRule.launchActivity( @@ -276,8 +237,9 @@ class CustomTabsTest { } } + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/249643 @Test - fun verifyCustomTabViewTest() { + fun verifyCustomTabViewItemsTest() { val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 1) intentReceiverActivityTestRule.launchActivity( @@ -302,8 +264,9 @@ class CustomTabsTest { } } + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2239544 @Test - fun verifyPdfCustomTabViewTest() { + fun verifyPDFViewerInACustomTabTest() { val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 3) val pdfFormResource = TestAssetHelper.getPdfFormAsset(mockWebServer) @@ -331,8 +294,9 @@ class CustomTabsTest { } } + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2239117 @Test - fun verifyETPSheetAndToggleTest() { + fun verifyCustomTabETPSheetAndToggleTest() { val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 1) intentReceiverActivityTestRule.launchActivity( -- 2.11.4.GIT