For #23716 fix and re-enable mediaSystemNotificationInPrivateModeTest

This commit is contained in:
AndiAJ 2022-04-18 16:44:04 +03:00 committed by mergify[bot]
parent 2b8cf67a97
commit 2761aff3ae
1 changed files with 9 additions and 4 deletions

View File

@ -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)