From cd16014a1df935b5c230e5e23394d5cd3e7e5a7e Mon Sep 17 00:00:00 2001 From: AndiAJ Date: Mon, 18 Apr 2022 16:44:04 +0300 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/23716 fix and re-enable mediaSystemNotificationInPrivateModeTest --- .../org/mozilla/fenix/ui/MediaNotificationTest.kt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/MediaNotificationTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/MediaNotificationTest.kt index 2510fc9062..d530391c29 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/MediaNotificationTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/MediaNotificationTest.kt @@ -15,6 +15,7 @@ import org.junit.Test import org.mozilla.fenix.ext.components import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.HomeActivityTestRule +import org.mozilla.fenix.helpers.RetryTestRule import org.mozilla.fenix.helpers.TestAssetHelper import org.mozilla.fenix.ui.robots.browserScreen import org.mozilla.fenix.ui.robots.homeScreen @@ -37,6 +38,10 @@ class MediaNotificationTest { val activityTestRule = HomeActivityTestRule() private lateinit var browserStore: BrowserStore + @Rule + @JvmField + val retryTestRule = RetryTestRule(3) + @Before fun setUp() { // Initializing this as part of class construction, below the rule would throw a NPE @@ -88,15 +93,15 @@ class MediaNotificationTest { mDevice.pressBack() } - @Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/23716") @Test fun mediaSystemNotificationInPrivateModeTest() { val audioTestPage = TestAssetHelper.getAudioPageAsset(mockWebServer) - homeScreen { }.togglePrivateBrowsingMode() - navigationToolbar { - }.enterURLAndEnterToBrowser(audioTestPage.url) { + }.openTabTray { + }.toggleToPrivateTabs { + }.openNewTab { + }.submitQuery(audioTestPage.url.toString()) { mDevice.waitForIdle() clickMediaPlayerPlayButton() assertPlaybackState(browserStore, MediaSession.PlaybackState.PLAYING)