diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/TabbedBrowsingTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/TabbedBrowsingTest.kt index c221b9304634..2f61ab6335b6 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/TabbedBrowsingTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/TabbedBrowsingTest.kt @@ -139,8 +139,8 @@ class TabbedBrowsingTest { @Test fun closeTabTest() { // disabling these features because they interfere with the snackbar visibility - activityTestRule.featureSettings.setPocketEnabled(false) - activityTestRule.featureSettings.setRecentTabsFeatureEnabled(false) + // activityTestRule.featureSettings.setPocketEnabled(false) + // activityTestRule.featureSettings.setRecentTabsFeatureEnabled(false) val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1) @@ -149,46 +149,29 @@ class TabbedBrowsingTest { }.openTabDrawer { verifyExistingOpenTabs("Test_Page_1") closeTab() - // verifySnackBarText("Tab closed") - // snackBarButtonClick("UNDO") } + homeScreen { verifyNoTabsOpened() - } - - // browserScreen { - // verifyTabCounter("1") - navigationToolbar { + }.openNavigationToolbar { }.enterURLAndEnterToBrowser(genericURL.url) { }.openTabDrawer { verifyExistingOpenTabs("Test_Page_1") swipeTabRight("Test_Page_1") - // verifySnackBarText("Tab closed") - // snackBarButtonClick("UNDO") } + homeScreen { verifyNoTabsOpened() - } - - // browserScreen { - // verifyTabCounter("1") - navigationToolbar { + }.openNavigationToolbar { }.enterURLAndEnterToBrowser(genericURL.url) { }.openTabDrawer { verifyExistingOpenTabs("Test_Page_1") swipeTabLeft("Test_Page_1") - // verifySnackBarText("Tab closed") - // snackBarButtonClick("UNDO") } + homeScreen { verifyNoTabsOpened() } - - // browserScreen { - // verifyTabCounter("1") - // }.openTabDrawer { - // verifyExistingOpenTabs("Test_Page_1") - // }.closeTabDrawer { } } @Test @@ -226,24 +209,42 @@ class TabbedBrowsingTest { verifyExistingOpenTabs("Test_Page_1") verifyCloseTabsButton("Test_Page_1") closeTab() - verifySnackBarText("Private tab closed") - snackBarButtonClick("UNDO") } - browserScreen { - verifyTabCounter("1") + homeScreen { + verifyNoTabsOpened() + }.openNavigationToolbar { + }.enterURLAndEnterToBrowser(genericURL.url) { }.openTabDrawer { verifyExistingOpenTabs("Test_Page_1") swipeTabRight("Test_Page_1") - verifySnackBarText("Private tab closed") - snackBarButtonClick("UNDO") } - browserScreen { - verifyTabCounter("1") + homeScreen { + verifyNoTabsOpened() + }.openNavigationToolbar { + }.enterURLAndEnterToBrowser(genericURL.url) { }.openTabDrawer { verifyExistingOpenTabs("Test_Page_1") swipeTabLeft("Test_Page_1") + } + + homeScreen { + verifyNoTabsOpened() + } + } + + @Test + fun verifyPrivateTabUndoSnackBarTest() { + val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1) + + homeScreen { }.togglePrivateBrowsingMode() + navigationToolbar { + }.enterURLAndEnterToBrowser(genericURL.url) { + }.openTabDrawer { + verifyExistingOpenTabs("Test_Page_1") + verifyCloseTabsButton("Test_Page_1") + closeTab() verifySnackBarText("Private tab closed") snackBarButtonClick("UNDO") } diff --git a/automation/taskcluster/androidTest/flank-x86.yml b/automation/taskcluster/androidTest/flank-x86.yml index e63b1cc08044..d073537ede06 100644 --- a/automation/taskcluster/androidTest/flank-x86.yml +++ b/automation/taskcluster/androidTest/flank-x86.yml @@ -41,7 +41,9 @@ gcloud: # - notPackage org.mozilla.fenix.screenshots # - notPackage org.mozilla.fenix.syncintegration - class org.mozilla.fenix.ui.TabbedBrowsingTest#closeTabTest + - class org.mozilla.fenix.ui.TabbedBrowsingTest#closePrivateTabTest - class org.mozilla.fenix.ui.TabbedBrowsingTest#verifyUndoSnackBarTest + - class org.mozilla.fenix.ui.TabbedBrowsingTest#verifyPrivateTabUndoSnackBarTest device: - model: Pixel2