For #27002 use featureSettingsHelper instead of app settings
This commit is contained in:
parent
7193e4e637
commit
43b6445b46
|
@ -20,7 +20,6 @@ import org.junit.Test
|
|||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.customannotations.SmokeTest
|
||||
import org.mozilla.fenix.ext.bookmarkStorage
|
||||
import org.mozilla.fenix.ext.settings
|
||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
||||
|
@ -366,8 +365,6 @@ class BookmarksTest {
|
|||
@Test
|
||||
@Ignore("Failing after compose migration. See: https://github.com/mozilla-mobile/fenix/issues/26087")
|
||||
fun openSelectionInNewTabTest() {
|
||||
val settings = activityTestRule.activity.applicationContext.settings()
|
||||
settings.shouldShowJumpBackInCFR = false
|
||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||
|
||||
browserScreen {
|
||||
|
|
|
@ -5,14 +5,12 @@
|
|||
package org.mozilla.fenix.ui
|
||||
|
||||
import androidx.core.net.toUri
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Ignore
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.ext.settings
|
||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||
import org.mozilla.fenix.helpers.TestHelper.packageName
|
||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
||||
|
@ -63,9 +61,8 @@ class NoNetworkAccessStartupTests {
|
|||
// Based on STR from https://github.com/mozilla-mobile/fenix/issues/16886
|
||||
@Test
|
||||
fun networkInterruptedFromBrowserToHomeTest() {
|
||||
featureSettingsHelper.setJumpBackCFREnabled(false)
|
||||
val url = "example.com"
|
||||
val settings = InstrumentationRegistry.getInstrumentation().targetContext.settings()
|
||||
settings.shouldShowJumpBackInCFR = false
|
||||
|
||||
activityTestRule.launchActivity(null)
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ import org.junit.Before
|
|||
import org.junit.Ignore
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.mozilla.fenix.ext.settings
|
||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||
import org.mozilla.fenix.helpers.FeatureSettingsHelper
|
||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||
|
@ -73,8 +72,8 @@ class SettingsAboutTest {
|
|||
// ABOUT
|
||||
@Test
|
||||
fun verifyRateOnGooglePlayRedirect() {
|
||||
val settings = activityIntentTestRule.activity.settings()
|
||||
settings.shouldShowTotalCookieProtectionCFR = false
|
||||
featureSettingsHelper.setTCPCFREnabled(false)
|
||||
|
||||
homeScreen {
|
||||
}.openThreeDotMenu {
|
||||
}.openSettings {
|
||||
|
@ -89,8 +88,7 @@ class SettingsAboutTest {
|
|||
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/25355")
|
||||
@Test
|
||||
fun verifyAboutFirefoxPreview() {
|
||||
val settings = activityIntentTestRule.activity.settings()
|
||||
settings.shouldShowJumpBackInCFR = false
|
||||
featureSettingsHelper.setJumpBackCFREnabled(false)
|
||||
homeScreen {
|
||||
}.openThreeDotMenu {
|
||||
}.openSettings {
|
||||
|
|
|
@ -18,7 +18,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.customannotations.SmokeTest
|
||||
import org.mozilla.fenix.ext.settings
|
||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||
import org.mozilla.fenix.helpers.FeatureSettingsHelper
|
||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||
|
@ -239,8 +238,6 @@ class SettingsPrivacyTest {
|
|||
@Test
|
||||
fun neverSaveLoginFromPromptTest() {
|
||||
val saveLoginTest = TestAssetHelper.getSaveLoginAsset(mockWebServer)
|
||||
val settings = activityTestRule.activity.settings()
|
||||
settings.shouldShowJumpBackInCFR = false
|
||||
|
||||
navigationToolbar {
|
||||
}.enterURLAndEnterToBrowser(saveLoginTest.url) {
|
||||
|
@ -395,8 +392,6 @@ class SettingsPrivacyTest {
|
|||
@Ignore("Failing with frequent ANR: https://bugzilla.mozilla.org/show_bug.cgi?id=1764605")
|
||||
@Test
|
||||
fun launchLinksInPrivateToggleOffStateDoesntChangeTest() {
|
||||
val settings = activityTestRule.activity.applicationContext.settings()
|
||||
settings.shouldShowJumpBackInCFR = false
|
||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||
|
||||
setOpenLinksInPrivateOn()
|
||||
|
|
Loading…
Reference in New Issue