Commit 5c6c0de4 authored by AndiAJ's avatar AndiAJ
Browse files

Bug 1842154 - Re-enable download related UI tests r=ohorvath,jajohnson

# **pauseResumeCancelDownloadTest** - was disabled 5 months ago due to a OutOfMemoryError -  successfully passed 200x on Firebase
  # **notificationCanBeDismissedIfDownloadIsInterruptedTest** -  successfully passed 200x on Firebase
     - was disabled 3 months ago because the failed download notification wasn't properly asserted
     - to overcome this problem, after disabling the network, I've added a step to first check the in app failed download prompt (be sure that when the notification tray is opened the download isn't still in progress) and also removed the **expandNotificationMessage()** step because it seems to be redundant

Differential Revision: https://phabricator.services.mozilla.com/D210146
parent f21d9b65
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -5,7 +5,6 @@
package org.mozilla.fenix.ui
package org.mozilla.fenix.ui


import androidx.core.net.toUri
import androidx.core.net.toUri
import org.junit.Ignore
import org.junit.Rule
import org.junit.Rule
import org.junit.Test
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.customannotations.SmokeTest
@@ -98,7 +97,6 @@ class DownloadTest : TestSetup() {
    }
    }


    // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/451563
    // 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
    @SmokeTest
    @Test
    @Test
    fun pauseResumeCancelDownloadTest() {
    fun pauseResumeCancelDownloadTest() {
@@ -243,18 +241,16 @@ class DownloadTest : TestSetup() {
    }
    }


    // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2299297
    // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2299297
    @Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1842154")
    @Test
    @Test
    fun notificationCanBeDismissedIfDownloadIsInterruptedTest() {
    fun notificationCanBeDismissedIfDownloadIsInterruptedTest() {
        downloadRobot {
        downloadRobot {
            openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "1GB.zip")
            openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "1GB.zip")
        }

            setNetworkEnabled(enabled = false)
            setNetworkEnabled(enabled = false)
            verifyDownloadFailedPrompt("1GB.zip")
        }


        browserScreen {
        browserScreen {
        }.openNotificationShade {
        }.openNotificationShade {
            expandNotificationMessage()
            verifySystemNotificationExists("Download failed")
            verifySystemNotificationExists("Download failed")
            swipeDownloadNotification("Left", true)
            swipeDownloadNotification("Left", true)
            verifySystemNotificationDoesNotExist("Firefox Fenix")
            verifySystemNotificationDoesNotExist("Firefox Fenix")