|
|
|
@ -13,6 +13,7 @@ import org.junit.Rule
|
|
|
|
|
import org.junit.Test
|
|
|
|
|
import org.mozilla.fenix.customannotations.SmokeTest
|
|
|
|
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_APPS_PHOTOS
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_DOCS
|
|
|
|
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
|
|
|
@ -20,6 +21,7 @@ import org.mozilla.fenix.helpers.TestAssetHelper
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.assertExternalAppOpens
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.deleteDownloadedFileOnStorage
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
|
|
|
|
import org.mozilla.fenix.ui.robots.browserScreen
|
|
|
|
@ -72,8 +74,9 @@ class DownloadTest {
|
|
|
|
|
setNetworkEnabled(enabled = true)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243844
|
|
|
|
|
@Test
|
|
|
|
|
fun testDownloadPrompt() {
|
|
|
|
|
fun verifyTheDownloadPromptsTest() {
|
|
|
|
|
downloadFile = "web_icon.png"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
@ -82,7 +85,7 @@ class DownloadTest {
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
verifyDownloadNotificationPopup()
|
|
|
|
|
verifyDownloadCompleteNotificationPopup()
|
|
|
|
|
}.clickOpen("image/png") {}
|
|
|
|
|
downloadRobot {
|
|
|
|
|
verifyPhotosAppOpens()
|
|
|
|
@ -91,25 +94,34 @@ class DownloadTest {
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2299405
|
|
|
|
|
@Test
|
|
|
|
|
fun testCloseDownloadPrompt() {
|
|
|
|
|
downloadFile = "smallZip.zip"
|
|
|
|
|
fun verifyTheDownloadFailedNotificationsTest() {
|
|
|
|
|
downloadFile = "1GB.zip"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.closePrompt {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openDownloadsManager {
|
|
|
|
|
verifyEmptyDownloadsList()
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
setNetworkEnabled(enabled = false)
|
|
|
|
|
verifyDownloadFailedPrompt(downloadFile)
|
|
|
|
|
setNetworkEnabled(enabled = true)
|
|
|
|
|
clickTryAgainButton()
|
|
|
|
|
}
|
|
|
|
|
mDevice.openNotification()
|
|
|
|
|
notificationShade {
|
|
|
|
|
verifySystemNotificationDoesNotExist("Download failed")
|
|
|
|
|
verifySystemNotificationExists(downloadFile)
|
|
|
|
|
}.closeNotificationTray {}
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2298616
|
|
|
|
|
@Test
|
|
|
|
|
fun testDownloadCompleteNotification() {
|
|
|
|
|
downloadFile = "smallZip.zip"
|
|
|
|
|
fun verifyDownloadCompleteNotificationTest() {
|
|
|
|
|
downloadFile = "web_icon.png"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
|
|
@ -117,15 +129,26 @@ class DownloadTest {
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
verifyDownloadNotificationPopup()
|
|
|
|
|
verifyDownloadCompleteNotificationPopup()
|
|
|
|
|
}
|
|
|
|
|
mDevice.openNotification()
|
|
|
|
|
notificationShade {
|
|
|
|
|
verifySystemNotificationExists("Download completed")
|
|
|
|
|
}
|
|
|
|
|
clickNotification("Download completed")
|
|
|
|
|
assertExternalAppOpens(GOOGLE_APPS_PHOTOS)
|
|
|
|
|
mDevice.pressBack()
|
|
|
|
|
mDevice.openNotification()
|
|
|
|
|
swipeDownloadNotification(
|
|
|
|
|
direction = "Left",
|
|
|
|
|
shouldDismissNotification = true,
|
|
|
|
|
canExpandNotification = false,
|
|
|
|
|
)
|
|
|
|
|
verifySystemNotificationDoesNotExist("Firefox Fenix")
|
|
|
|
|
}.closeNotificationTray {}
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/451563
|
|
|
|
|
@Ignore("Failing: Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1813521")
|
|
|
|
|
@SmokeTest
|
|
|
|
|
@Test
|
|
|
|
@ -148,8 +171,10 @@ class DownloadTest {
|
|
|
|
|
verifySystemNotificationExists("Firefox Fenix")
|
|
|
|
|
expandNotificationMessage()
|
|
|
|
|
clickDownloadNotificationControlButton("PAUSE")
|
|
|
|
|
verifySystemNotificationExists("Download paused")
|
|
|
|
|
clickDownloadNotificationControlButton("RESUME")
|
|
|
|
|
clickDownloadNotificationControlButton("CANCEL")
|
|
|
|
|
verifySystemNotificationDoesNotExist(downloadFile)
|
|
|
|
|
mDevice.pressBack()
|
|
|
|
|
}
|
|
|
|
|
browserScreen {
|
|
|
|
@ -160,42 +185,9 @@ class DownloadTest {
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Verifies downloads in the Downloads Menu:
|
|
|
|
|
- downloads appear in the list
|
|
|
|
|
- deleting a download from device storage, removes it from the Downloads Menu too
|
|
|
|
|
*/
|
|
|
|
|
@SmokeTest
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2301474
|
|
|
|
|
@Test
|
|
|
|
|
fun manageDownloadsInDownloadsMenuTest() {
|
|
|
|
|
// a long filename to verify it's correctly displayed on the prompt and in the Downloads menu
|
|
|
|
|
downloadFile =
|
|
|
|
|
"tAJwqaWjJsXS8AhzSninBMCfIZbHBGgcc001lx5DIdDwIcfEgQ6vE5Gb5VgAled17DFZ2A7ZDOHA0NpQPHXXFt.svg"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
verifyDownloadNotificationPopup()
|
|
|
|
|
}
|
|
|
|
|
browserScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openDownloadsManager {
|
|
|
|
|
waitForDownloadsListToExist()
|
|
|
|
|
verifyDownloadedFileName(downloadFile)
|
|
|
|
|
verifyDownloadedFileIcon()
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}.exitDownloadsManagerToBrowser {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openDownloadsManager {
|
|
|
|
|
verifyEmptyDownloadsList()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@SmokeTest
|
|
|
|
|
@Test
|
|
|
|
|
fun openDownloadedFileTest() {
|
|
|
|
|
fun openDownloadedFileFromDownloadsMenuTest() {
|
|
|
|
|
downloadFile = "web_icon.png"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
@ -204,7 +196,7 @@ class DownloadTest {
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
verifyDownloadNotificationPopup()
|
|
|
|
|
verifyDownloadCompleteNotificationPopup()
|
|
|
|
|
}
|
|
|
|
|
browserScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
@ -239,32 +231,11 @@ class DownloadTest {
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1114970
|
|
|
|
|
@Test
|
|
|
|
|
fun deleteDownloadedFileTest() {
|
|
|
|
|
downloadFile = "smallZip.zip"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
verifyDownloadedFileName(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
browserScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openDownloadsManager {
|
|
|
|
|
verifyDownloadedFileName(downloadFile)
|
|
|
|
|
deleteDownloadedItem(downloadFile)
|
|
|
|
|
verifyEmptyDownloadsList()
|
|
|
|
|
}
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun undoDeleteDownloadedFileTest() {
|
|
|
|
|
downloadFile = "smallZip.zip"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
@ -280,10 +251,13 @@ class DownloadTest {
|
|
|
|
|
deleteDownloadedItem(downloadFile)
|
|
|
|
|
clickSnackbarButton("UNDO")
|
|
|
|
|
verifyDownloadedFileName(downloadFile)
|
|
|
|
|
deleteDownloadedItem(downloadFile)
|
|
|
|
|
verifyEmptyDownloadsList()
|
|
|
|
|
}
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2302662
|
|
|
|
|
@Test
|
|
|
|
|
fun deleteMultipleDownloadedFilesTest() {
|
|
|
|
|
val firstDownloadedFile = "smallZip.zip"
|
|
|
|
@ -305,6 +279,13 @@ class DownloadTest {
|
|
|
|
|
browserScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openDownloadsManager {
|
|
|
|
|
verifyDownloadedFileName(firstDownloadedFile)
|
|
|
|
|
verifyDownloadedFileName(secondDownloadedFile)
|
|
|
|
|
longClickDownloadedItem(firstDownloadedFile)
|
|
|
|
|
selectDownloadedItem(secondDownloadedFile)
|
|
|
|
|
openMultiSelectMoreOptionsMenu()
|
|
|
|
|
clickMultiSelectRemoveButton()
|
|
|
|
|
clickSnackbarButton("UNDO")
|
|
|
|
|
verifyDownloadedFileName(firstDownloadedFile)
|
|
|
|
|
verifyDownloadedFileName(secondDownloadedFile)
|
|
|
|
|
longClickDownloadedItem(firstDownloadedFile)
|
|
|
|
@ -317,70 +298,52 @@ class DownloadTest {
|
|
|
|
|
deleteDownloadedFileOnStorage(secondDownloadedFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2301537
|
|
|
|
|
@Test
|
|
|
|
|
fun undoDeleteMultipleDownloadedFilesTest() {
|
|
|
|
|
val firstDownloadedFile = "smallZip.zip"
|
|
|
|
|
val secondDownloadedFile = "textfile.txt"
|
|
|
|
|
fun fileDeletedFromStorageIsDeletedEverywhereTest() {
|
|
|
|
|
val downloadFile = "smallZip.zip"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
|
}.clickDownloadLink(firstDownloadedFile) {
|
|
|
|
|
verifyDownloadPrompt(firstDownloadedFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
verifyDownloadedFileName(firstDownloadedFile)
|
|
|
|
|
}.closeCompletedDownloadPrompt {
|
|
|
|
|
}.clickDownloadLink(secondDownloadedFile) {
|
|
|
|
|
verifyDownloadPrompt(secondDownloadedFile)
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
verifyDownloadedFileName(secondDownloadedFile)
|
|
|
|
|
verifyDownloadCompleteNotificationPopup()
|
|
|
|
|
}
|
|
|
|
|
browserScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openDownloadsManager {
|
|
|
|
|
verifyDownloadedFileName(firstDownloadedFile)
|
|
|
|
|
verifyDownloadedFileName(secondDownloadedFile)
|
|
|
|
|
longClickDownloadedItem(firstDownloadedFile)
|
|
|
|
|
selectDownloadedItem(secondDownloadedFile)
|
|
|
|
|
openMultiSelectMoreOptionsMenu()
|
|
|
|
|
clickMultiSelectRemoveButton()
|
|
|
|
|
clickSnackbarButton("UNDO")
|
|
|
|
|
verifyDownloadedFileName(firstDownloadedFile)
|
|
|
|
|
verifyDownloadedFileName(secondDownloadedFile)
|
|
|
|
|
}
|
|
|
|
|
deleteDownloadedFileOnStorage(firstDownloadedFile)
|
|
|
|
|
deleteDownloadedFileOnStorage(secondDownloadedFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore("Failing: https://bugzilla.mozilla.org/show_bug.cgi?id=1840994")
|
|
|
|
|
@Test
|
|
|
|
|
fun systemNotificationCantBeDismissedWhileDownloadingTest() {
|
|
|
|
|
// Clear the "Firefox Fenix default browser notification"
|
|
|
|
|
notificationShade {
|
|
|
|
|
cancelAllShownNotifications()
|
|
|
|
|
waitForDownloadsListToExist()
|
|
|
|
|
verifyDownloadedFileName(downloadFile)
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}.exitDownloadsManagerToBrowser {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openDownloadsManager {
|
|
|
|
|
verifyEmptyDownloadsList()
|
|
|
|
|
exitMenu()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
downloadFile = "1GB.zip"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
verifyDownloadCompleteNotificationPopup()
|
|
|
|
|
}
|
|
|
|
|
browserScreen {
|
|
|
|
|
}.openNotificationShade {
|
|
|
|
|
verifySystemNotificationExists("Firefox Fenix")
|
|
|
|
|
expandNotificationMessage()
|
|
|
|
|
swipeDownloadNotification("Left", false)
|
|
|
|
|
clickDownloadNotificationControlButton("CANCEL")
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openDownloadsManager {
|
|
|
|
|
waitForDownloadsListToExist()
|
|
|
|
|
verifyDownloadedFileName(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore("Failing: https://bugzilla.mozilla.org/show_bug.cgi?id=1840994")
|
|
|
|
|
@Test
|
|
|
|
|
fun systemNotificationCantBeDismissedWhileDownloadIsPausedTest() {
|
|
|
|
|
fun systemNotificationCantBeDismissedWhileInProgressTest() {
|
|
|
|
|
// Clear the "Firefox Fenix default browser notification"
|
|
|
|
|
notificationShade {
|
|
|
|
|
cancelAllShownNotifications()
|
|
|
|
@ -399,15 +362,9 @@ class DownloadTest {
|
|
|
|
|
}.openNotificationShade {
|
|
|
|
|
verifySystemNotificationExists("Firefox Fenix")
|
|
|
|
|
expandNotificationMessage()
|
|
|
|
|
swipeDownloadNotification(direction = "Left", shouldDismissNotification = false)
|
|
|
|
|
clickDownloadNotificationControlButton("PAUSE")
|
|
|
|
|
swipeDownloadNotification("Left", false)
|
|
|
|
|
verifySystemNotificationExists("Firefox Fenix")
|
|
|
|
|
}.closeNotificationTray {
|
|
|
|
|
}.openNotificationShade {
|
|
|
|
|
verifySystemNotificationExists("Firefox Fenix")
|
|
|
|
|
expandNotificationMessage()
|
|
|
|
|
swipeDownloadNotification("Right", false)
|
|
|
|
|
verifySystemNotificationExists("Firefox Fenix")
|
|
|
|
|
swipeDownloadNotification(direction = "Right", shouldDismissNotification = false)
|
|
|
|
|
clickDownloadNotificationControlButton("CANCEL")
|
|
|
|
|
}
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
@ -427,8 +384,7 @@ class DownloadTest {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
}
|
|
|
|
|
}.clickDownload {}
|
|
|
|
|
|
|
|
|
|
setNetworkEnabled(enabled = false)
|
|
|
|
|
|
|
|
|
@ -438,8 +394,7 @@ class DownloadTest {
|
|
|
|
|
expandNotificationMessage()
|
|
|
|
|
swipeDownloadNotification("Left", true)
|
|
|
|
|
verifySystemNotificationDoesNotExist("Firefox Fenix")
|
|
|
|
|
}.closeNotificationTray {
|
|
|
|
|
}
|
|
|
|
|
}.closeNotificationTray {}
|
|
|
|
|
|
|
|
|
|
downloadRobot {
|
|
|
|
|
}.closeDownloadPrompt {
|
|
|
|
@ -449,56 +404,22 @@ class DownloadTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun notificationCanBeDismissedIfDownloadIsCompletedTest() {
|
|
|
|
|
// Clear the "Firefox Fenix default browser notification"
|
|
|
|
|
notificationShade {
|
|
|
|
|
cancelAllShownNotifications()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
downloadFile = "smallZip.zip"
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
browserScreen {
|
|
|
|
|
}.openNotificationShade {
|
|
|
|
|
verifySystemNotificationExists("Download completed")
|
|
|
|
|
swipeDownloadNotification("Left", true, false)
|
|
|
|
|
verifySystemNotificationDoesNotExist("Firefox Fenix")
|
|
|
|
|
}.closeNotificationTray {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
downloadRobot {
|
|
|
|
|
}.closeDownloadPrompt {
|
|
|
|
|
verifyDownloadPromptIsDismissed()
|
|
|
|
|
}
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
fun warningWhenClosingPrivateTabsWhileDownloadingTest() {
|
|
|
|
|
downloadFile = "1GB.zip"
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun stayInPrivateBrowsingPromptTest() {
|
|
|
|
|
// Clear the "Firefox Fenix default browser notification"
|
|
|
|
|
notificationShade {
|
|
|
|
|
cancelAllShownNotifications()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
downloadFile = "1GB.zip"
|
|
|
|
|
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.togglePrivateBrowsingMode()
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
}
|
|
|
|
|
}.clickDownload {}
|
|
|
|
|
browserScreen {
|
|
|
|
|
}.openTabDrawer {
|
|
|
|
|
closeTab()
|
|
|
|
@ -512,15 +433,16 @@ class DownloadTest {
|
|
|
|
|
deleteDownloadedFileOnStorage(downloadFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2302663
|
|
|
|
|
@Test
|
|
|
|
|
fun cancelActiveDownloadsFromPrivateBrowsingPromptTest() {
|
|
|
|
|
fun cancelActivePrivateBrowsingDownloadsTest() {
|
|
|
|
|
downloadFile = "1GB.zip"
|
|
|
|
|
|
|
|
|
|
// Clear the "Firefox Fenix default browser notification"
|
|
|
|
|
notificationShade {
|
|
|
|
|
cancelAllShownNotifications()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
downloadFile = "1GB.zip"
|
|
|
|
|
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.togglePrivateBrowsingMode()
|
|
|
|
|
|
|
|
|
@ -529,8 +451,7 @@ class DownloadTest {
|
|
|
|
|
waitForPageToLoad()
|
|
|
|
|
}.clickDownloadLink(downloadFile) {
|
|
|
|
|
verifyDownloadPrompt(downloadFile)
|
|
|
|
|
}.clickDownload {
|
|
|
|
|
}
|
|
|
|
|
}.clickDownload {}
|
|
|
|
|
browserScreen {
|
|
|
|
|
}.openTabDrawer {
|
|
|
|
|
closeTab()
|
|
|
|
|