Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
run #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Oana Horvath committed Oct 28, 2021
1 parent 2f15f54 commit d22d0ef
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 32 deletions.
65 changes: 33 additions & 32 deletions app/src/androidTest/java/org/mozilla/fenix/ui/TabbedBrowsingTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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")
}
Expand Down
2 changes: 2 additions & 0 deletions automation/taskcluster/androidTest/flank-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d22d0ef

Please sign in to comment.