mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
Bug 1818703 - Re-enable youControlYourDataCardTest UI test
This commit is contained in:
parent
3967e441eb
commit
b478cfa450
@ -3,16 +3,18 @@ package org.mozilla.fenix.ui
|
||||
import android.content.res.Configuration
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.uiautomator.UiDevice
|
||||
import mozilla.components.concept.engine.utils.EngineReleaseChannel
|
||||
import okhttp3.mockwebserver.MockWebServer
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Ignore
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.mozilla.fenix.customannotations.SmokeTest
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||
import org.mozilla.fenix.helpers.TestHelper.runWithCondition
|
||||
import org.mozilla.fenix.helpers.TestHelper.verifyDarkThemeApplied
|
||||
import org.mozilla.fenix.helpers.TestHelper.verifyLightThemeApplied
|
||||
import org.mozilla.fenix.ui.robots.homeScreen
|
||||
@ -228,14 +230,20 @@ class OnboardingTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Failing due to changes from https://github.com/mozilla-mobile/firefox-android/pull/969")
|
||||
fun youControlYourDataCardTest() {
|
||||
homeScreen {
|
||||
verifyPrivacyNoticeCard()
|
||||
}.clickPrivacyNoticeButton {
|
||||
verifyUrl(privacyNoticeLink)
|
||||
}.goBack {
|
||||
verifyPrivacyNoticeCard()
|
||||
runWithCondition(
|
||||
// Returns the GeckoView channel set for the current version, if a feature is limited to Nightly.
|
||||
// Once this feature lands in Beta/RC we should remove the wrapper.
|
||||
activityTestRule.activity.components.core.engine.version.releaseChannel == EngineReleaseChannel.NIGHTLY ||
|
||||
activityTestRule.activity.components.core.engine.version.releaseChannel == EngineReleaseChannel.BETA,
|
||||
) {
|
||||
homeScreen {
|
||||
verifyPrivacyNoticeCard()
|
||||
}.clickPrivacyNoticeButton {
|
||||
verifyCustomTabToolbarTitle("Firefox Privacy Notice")
|
||||
}.goBackToOnboardingScreen {
|
||||
verifyPrivacyNoticeCard()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -143,6 +143,13 @@ class CustomTabRobot {
|
||||
BrowserRobot().interact()
|
||||
return BrowserRobot.Transition()
|
||||
}
|
||||
|
||||
fun goBackToOnboardingScreen(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition {
|
||||
mDevice.pressBack()
|
||||
|
||||
HomeScreenRobot().interact()
|
||||
return HomeScreenRobot.Transition()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -819,11 +819,11 @@ class HomeScreenRobot {
|
||||
return SyncSignInRobot.Transition()
|
||||
}
|
||||
|
||||
fun clickPrivacyNoticeButton(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition {
|
||||
fun clickPrivacyNoticeButton(interact: CustomTabRobot.() -> Unit): CustomTabRobot.Transition {
|
||||
privacyNoticeButton.clickAndWaitForNewWindow(waitingTimeShort)
|
||||
|
||||
BrowserRobot().interact()
|
||||
return BrowserRobot.Transition()
|
||||
CustomTabRobot().interact()
|
||||
return CustomTabRobot.Transition()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user