diff --git a/app/src/androidTest/java/org/mozilla/fenix/helpers/TestSetup.kt b/app/src/androidTest/java/org/mozilla/fenix/helpers/TestSetup.kt new file mode 100644 index 000000000..d19f50c3f --- /dev/null +++ b/app/src/androidTest/java/org/mozilla/fenix/helpers/TestSetup.kt @@ -0,0 +1,50 @@ +package org.mozilla.fenix.helpers + +import android.util.Log +import kotlinx.coroutines.runBlocking +import mozilla.appservices.places.BookmarkRoot +import mozilla.components.browser.storage.sync.PlacesBookmarksStorage +import okhttp3.mockwebserver.MockWebServer +import org.junit.Before +import org.mozilla.fenix.helpers.Constants.TAG +import org.mozilla.fenix.helpers.TestHelper.appContext +import org.mozilla.fenix.ui.robots.notificationShade + +open class TestSetup { + lateinit var mockWebServer: MockWebServer + private val bookmarksStorage = PlacesBookmarksStorage(appContext.applicationContext) + + @Before + fun setUp() { + Log.i(TAG, "TestSetup: Starting the @Before setup") + // Clear pre-existing notifications + notificationShade { + cancelAllShownNotifications() + } + runBlocking { + // Reset locale to EN-US if needed. + AppAndSystemHelper.resetSystemLocaleToEnUS() + // Check and clear the downloads folder + AppAndSystemHelper.clearDownloadsFolder() + // Make sure the Wifi and Mobile Data connections are on + AppAndSystemHelper.setNetworkEnabled(true) + // Clear bookmarks left after a failed test + val bookmarks = bookmarksStorage.getTree(BookmarkRoot.Mobile.id)?.children + Log.i(TAG, "Before cleanup: Bookmarks storage contains: $bookmarks") + bookmarks?.forEach { bookmarksStorage.deleteNode(it.guid) } + // TODO: Follow-up with a method to handle the DB update; the logs will still show the bookmarks in the storage before the test starts. + Log.i(TAG, "After cleanup: Bookmarks storage contains: $bookmarks") + } + mockWebServer = MockWebServer().apply { + dispatcher = AndroidAssetDispatcher() + } + try { + Log.i(TAG, "Try starting mockWebServer") + mockWebServer.start() + } catch (e: Exception) { + Log.i(TAG, "Exception caught. Re-starting mockWebServer") + mockWebServer.shutdown() + mockWebServer.start() + } + } +} diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/AddressAutofillTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/AddressAutofillTest.kt index 4631b8a7a..b8b675778 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/AddressAutofillTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/AddressAutofillTest.kt @@ -4,27 +4,22 @@ package org.mozilla.fenix.ui -import okhttp3.mockwebserver.MockWebServer -import org.junit.After -import org.junit.Before import org.junit.Rule import org.junit.Test import org.mozilla.fenix.customannotations.SmokeTest -import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.HomeActivityIntentTestRule import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdContainingText import org.mozilla.fenix.helpers.TestAssetHelper import org.mozilla.fenix.helpers.TestHelper.exitMenu import org.mozilla.fenix.helpers.TestHelper.packageName +import org.mozilla.fenix.helpers.TestSetup import org.mozilla.fenix.ui.robots.autofillScreen import org.mozilla.fenix.ui.robots.clickPageObject import org.mozilla.fenix.ui.robots.homeScreen import org.mozilla.fenix.ui.robots.navigationToolbar -class AddressAutofillTest { - private lateinit var mockWebServer: MockWebServer - +class AddressAutofillTest : TestSetup() { object FirstAddressAutofillDetails { var navigateToAutofillSettings = true var isAddressAutofillEnabled = true @@ -58,19 +53,6 @@ class AddressAutofillTest { @get:Rule val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides() - @Before - fun setUp() { - mockWebServer = MockWebServer().apply { - dispatcher = AndroidAssetDispatcher() - start() - } - } - - @After - fun tearDown() { - mockWebServer.shutdown() - } - // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1836845 @SmokeTest @Test diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/BookmarksTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/BookmarksTest.kt index 2d2a1fc97..8b7b220ce 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/BookmarksTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/BookmarksTest.kt @@ -8,20 +8,13 @@ import androidx.compose.ui.test.junit4.AndroidComposeTestRule import androidx.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu import androidx.test.espresso.Espresso.pressBack import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation -import androidx.test.uiautomator.UiDevice import kotlinx.coroutines.runBlocking -import mozilla.appservices.places.BookmarkRoot -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.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.AppAndSystemHelper.registerAndCleanupIdlingResources import org.mozilla.fenix.helpers.HomeActivityIntentTestRule import org.mozilla.fenix.helpers.MockBrowserDataHelper.createBookmarkItem @@ -31,8 +24,10 @@ import org.mozilla.fenix.helpers.TestAssetHelper import org.mozilla.fenix.helpers.TestHelper.appContext import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem +import org.mozilla.fenix.helpers.TestHelper.mDevice import org.mozilla.fenix.helpers.TestHelper.restartApp import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText +import org.mozilla.fenix.helpers.TestSetup import org.mozilla.fenix.ui.robots.bookmarksMenu import org.mozilla.fenix.ui.robots.browserScreen import org.mozilla.fenix.ui.robots.homeScreen @@ -42,9 +37,7 @@ import org.mozilla.fenix.ui.robots.navigationToolbar /** * Tests for verifying basic functionality of bookmarks */ -class BookmarksTest { - private lateinit var mockWebServer: MockWebServer - private lateinit var mDevice: UiDevice +class BookmarksTest : TestSetup() { private val bookmarksFolderName = "New Folder" private val testBookmark = object { var title: String = "Bookmark title" @@ -61,26 +54,6 @@ class BookmarksTest { @JvmField val retryTestRule = RetryTestRule(3) - @Before - fun setUp() { - mDevice = UiDevice.getInstance(getInstrumentation()) - mockWebServer = MockWebServer().apply { - dispatcher = AndroidAssetDispatcher() - start() - } - } - - @After - fun tearDown() { - mockWebServer.shutdown() - // Clearing all bookmarks data after each test to avoid overlapping data - val bookmarksStorage = activityTestRule.activity?.bookmarkStorage - runBlocking { - val bookmarks = bookmarksStorage?.getTree(BookmarkRoot.Mobile.id)?.children - bookmarks?.forEach { bookmarksStorage.deleteNode(it.guid) } - } - } - // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/522919 @Test fun verifyEmptyBookmarksMenuTest() { diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/BrowsingErrorPagesTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/BrowsingErrorPagesTest.kt index de05a516a..608c0e919 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/BrowsingErrorPagesTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/BrowsingErrorPagesTest.kt @@ -5,20 +5,17 @@ package org.mozilla.fenix.ui import androidx.core.net.toUri -import okhttp3.mockwebserver.MockWebServer -import org.junit.After -import org.junit.Before import org.junit.Rule import org.junit.Test import org.mozilla.fenix.R import org.mozilla.fenix.customannotations.SmokeTest -import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.AppAndSystemHelper.setNetworkEnabled import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource import org.mozilla.fenix.helpers.HomeActivityTestRule import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId import org.mozilla.fenix.helpers.RetryTestRule import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset +import org.mozilla.fenix.helpers.TestSetup import org.mozilla.fenix.ui.robots.browserScreen import org.mozilla.fenix.ui.robots.clickPageObject import org.mozilla.fenix.ui.robots.navigationToolbar @@ -26,13 +23,12 @@ import org.mozilla.fenix.ui.robots.navigationToolbar /** * Tests that verify errors encountered while browsing websites: unsafe pages, connection errors, etc */ -class BrowsingErrorPagesTest { +class BrowsingErrorPagesTest : TestSetup() { private val malwareWarning = getStringResource(R.string.mozac_browser_errorpages_safe_browsing_malware_uri_title) private val phishingWarning = getStringResource(R.string.mozac_browser_errorpages_safe_phishing_uri_title) private val unwantedSoftwareWarning = getStringResource(R.string.mozac_browser_errorpages_safe_browsing_unwanted_uri_title) private val harmfulSiteWarning = getStringResource(R.string.mozac_browser_errorpages_safe_harmful_uri_title) - private lateinit var mockWebServer: MockWebServer @get: Rule val mActivityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides() @@ -41,21 +37,6 @@ class BrowsingErrorPagesTest { @JvmField val retryTestRule = RetryTestRule(3) - @Before - fun setUp() { - mockWebServer = MockWebServer().apply { - dispatcher = AndroidAssetDispatcher() - start() - } - } - - @After - fun tearDown() { - // Restoring network connection - setNetworkEnabled(true) - mockWebServer.shutdown() - } - // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2326774 @SmokeTest @Test diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt index c917f4d3f..74e7b136c 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt @@ -5,20 +5,16 @@ package org.mozilla.fenix.ui import androidx.compose.ui.test.junit4.AndroidComposeTestRule -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.uiautomator.UiDevice -import okhttp3.mockwebserver.MockWebServer -import org.junit.After -import org.junit.Before import org.junit.Rule import org.junit.Test import org.mozilla.fenix.customannotations.SmokeTest -import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.HomeActivityIntentTestRule import org.mozilla.fenix.helpers.TestAssetHelper import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton +import org.mozilla.fenix.helpers.TestHelper.mDevice import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText +import org.mozilla.fenix.helpers.TestSetup import org.mozilla.fenix.ui.robots.browserScreen import org.mozilla.fenix.ui.robots.collectionRobot import org.mozilla.fenix.ui.robots.homeScreen @@ -30,9 +26,7 @@ import org.mozilla.fenix.ui.robots.tabDrawer * */ -class CollectionTest { - private lateinit var mDevice: UiDevice - private lateinit var mockWebServer: MockWebServer +class CollectionTest : TestSetup() { private val firstCollectionName = "testcollection_1" private val secondCollectionName = "testcollection_2" private val collectionName = "First Collection" @@ -51,20 +45,6 @@ class CollectionTest { ), ) { it.activity } - @Before - fun setUp() { - mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) - mockWebServer = MockWebServer().apply { - dispatcher = AndroidAssetDispatcher() - start() - } - } - - @After - fun tearDown() { - mockWebServer.shutdown() - } - // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/353823 @SmokeTest @Test diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/ContextMenusTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/ContextMenusTest.kt index eeeec68a7..80f2d2a75 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/ContextMenusTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/ContextMenusTest.kt @@ -5,15 +5,8 @@ package org.mozilla.fenix.ui import androidx.core.net.toUri -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.uiautomator.UiDevice -import okhttp3.mockwebserver.MockWebServer -import org.junit.After -import org.junit.Before 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.AppAndSystemHelper.assertExternalAppOpens import org.mozilla.fenix.helpers.Constants.PackageName.YOUTUBE_APP import org.mozilla.fenix.helpers.HomeActivityIntentTestRule @@ -22,7 +15,9 @@ import org.mozilla.fenix.helpers.MatcherHelper.itemWithText import org.mozilla.fenix.helpers.RetryTestRule import org.mozilla.fenix.helpers.TestAssetHelper import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton +import org.mozilla.fenix.helpers.TestHelper.mDevice import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText +import org.mozilla.fenix.helpers.TestSetup import org.mozilla.fenix.ui.robots.clickContextMenuItem import org.mozilla.fenix.ui.robots.clickPageObject import org.mozilla.fenix.ui.robots.downloadRobot @@ -44,32 +39,15 @@ import org.mozilla.fenix.ui.robots.shareOverlay * */ -class ContextMenusTest { - private lateinit var mDevice: UiDevice - private lateinit var mockWebServer: MockWebServer +class ContextMenusTest : TestSetup() { @get:Rule - val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides() + val activityIntentTestRule = HomeActivityIntentTestRule(isJumpBackInCFREnabled = false) @Rule @JvmField val retryTestRule = RetryTestRule(3) - @Before - fun setUp() { - activityIntentTestRule.activity.applicationContext.settings().shouldShowJumpBackInCFR = false - mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) - mockWebServer = MockWebServer().apply { - dispatcher = AndroidAssetDispatcher() - start() - } - } - - @After - fun tearDown() { - mockWebServer.shutdown() - } - // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243837 @Test fun verifyOpenLinkNewTabContextMenuOptionTest() { diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/CookieBannerBlockerTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/CookieBannerBlockerTest.kt index 7ff48e390..cc9fff3d1 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/CookieBannerBlockerTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/CookieBannerBlockerTest.kt @@ -12,13 +12,14 @@ import org.mozilla.fenix.ext.settings import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithCondition import org.mozilla.fenix.helpers.HomeActivityIntentTestRule import org.mozilla.fenix.helpers.TestHelper.appContext +import org.mozilla.fenix.helpers.TestSetup import org.mozilla.fenix.ui.robots.homeScreen import org.mozilla.fenix.ui.robots.navigationToolbar /** * Tests for verifying the new Cookie banner blocker option and functionality. */ -class CookieBannerBlockerTest { +class CookieBannerBlockerTest : TestSetup() { @get:Rule val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides(skipOnboarding = true) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/CrashReportingTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/CrashReportingTest.kt index f246930bd..84083e014 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/CrashReportingTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/CrashReportingTest.kt @@ -5,29 +5,23 @@ package org.mozilla.fenix.ui import androidx.compose.ui.test.junit4.AndroidComposeTestRule -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.uiautomator.UiDevice -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.R import org.mozilla.fenix.customannotations.SmokeTest -import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource import org.mozilla.fenix.helpers.HomeActivityIntentTestRule import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId import org.mozilla.fenix.helpers.TestAssetHelper +import org.mozilla.fenix.helpers.TestHelper.mDevice import org.mozilla.fenix.helpers.TestHelper.packageName +import org.mozilla.fenix.helpers.TestSetup import org.mozilla.fenix.ui.robots.clickPageObject import org.mozilla.fenix.ui.robots.homeScreen import org.mozilla.fenix.ui.robots.navigationToolbar -class CrashReportingTest { - private lateinit var mDevice: UiDevice - private lateinit var mockWebServer: MockWebServer +class CrashReportingTest : TestSetup() { private val tabCrashMessage = getStringResource(R.string.tab_crash_title_2) @get:Rule @@ -40,20 +34,6 @@ class CrashReportingTest { ), ) { it.activity } - @Before - fun setUp() { - mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) - mockWebServer = MockWebServer().apply { - dispatcher = AndroidAssetDispatcher() - start() - } - } - - @After - fun tearDown() { - mockWebServer.shutdown() - } - // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/308906 @Test fun closeTabFromCrashedTabReporterTest() { diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/CreditCardAutofillTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/CreditCardAutofillTest.kt index f9eb0891b..9a9b5697b 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/CreditCardAutofillTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/CreditCardAutofillTest.kt @@ -4,13 +4,9 @@ package org.mozilla.fenix.ui -import okhttp3.mockwebserver.MockWebServer -import org.junit.After -import org.junit.Before import org.junit.Rule import org.junit.Test import org.mozilla.fenix.customannotations.SmokeTest -import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.AppAndSystemHelper.bringAppToForeground import org.mozilla.fenix.helpers.AppAndSystemHelper.putAppToBackground import org.mozilla.fenix.helpers.HomeActivityIntentTestRule @@ -19,14 +15,13 @@ import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdContainingText import org.mozilla.fenix.helpers.TestAssetHelper import org.mozilla.fenix.helpers.TestHelper.exitMenu import org.mozilla.fenix.helpers.TestHelper.packageName +import org.mozilla.fenix.helpers.TestSetup import org.mozilla.fenix.ui.robots.clickPageObject import org.mozilla.fenix.ui.robots.homeScreen import org.mozilla.fenix.ui.robots.navigationToolbar import java.time.LocalDate -class CreditCardAutofillTest { - private lateinit var mockWebServer: MockWebServer - +class CreditCardAutofillTest : TestSetup() { object MockCreditCard1 { const val MOCK_CREDIT_CARD_NUMBER = "5555555555554444" const val MOCK_LAST_CARD_DIGITS = "4444" @@ -48,19 +43,6 @@ class CreditCardAutofillTest { @get:Rule val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides() - @Before - fun setUp() { - mockWebServer = MockWebServer().apply { - dispatcher = AndroidAssetDispatcher() - start() - } - } - - @After - fun tearDown() { - mockWebServer.shutdown() - } - // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512792 @SmokeTest @Test diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/CustomTabsTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/CustomTabsTest.kt index b014dbb61..1e2aa93e8 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/CustomTabsTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/CustomTabsTest.kt @@ -7,25 +7,20 @@ package org.mozilla.fenix.ui import androidx.core.net.toUri -import androidx.test.platform.app.InstrumentationRegistry import androidx.test.rule.ActivityTestRule -import androidx.test.uiautomator.UiDevice -import okhttp3.mockwebserver.MockWebServer -import org.junit.After -import org.junit.Before import org.junit.Rule import org.junit.Test import org.mozilla.fenix.IntentReceiverActivity import org.mozilla.fenix.customannotations.SmokeTest -import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.AppAndSystemHelper.openAppFromExternalLink import org.mozilla.fenix.helpers.DataGenerationHelper.createCustomTabIntent -import org.mozilla.fenix.helpers.FeatureSettingsHelperDelegate import org.mozilla.fenix.helpers.HomeActivityIntentTestRule import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText import org.mozilla.fenix.helpers.MatcherHelper.itemWithText import org.mozilla.fenix.helpers.TestAssetHelper import org.mozilla.fenix.helpers.TestHelper.exitMenu +import org.mozilla.fenix.helpers.TestHelper.mDevice +import org.mozilla.fenix.helpers.TestSetup import org.mozilla.fenix.ui.robots.browserScreen import org.mozilla.fenix.ui.robots.clickPageObject import org.mozilla.fenix.ui.robots.customTabScreen @@ -36,9 +31,7 @@ import org.mozilla.fenix.ui.robots.notificationShade import org.mozilla.fenix.ui.robots.openEditURLView import org.mozilla.fenix.ui.robots.searchScreen -class CustomTabsTest { - private lateinit var mDevice: UiDevice - private lateinit var mockWebServer: MockWebServer +class CustomTabsTest : TestSetup() { private val customMenuItem = "TestMenuItem" private val customTabActionButton = "CustomActionButton" @@ -58,23 +51,6 @@ class CustomTabsTest { false, ) - private val featureSettingsHelper = FeatureSettingsHelperDelegate() - - @Before - fun setUp() { - mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) - mockWebServer = MockWebServer().apply { - dispatcher = AndroidAssetDispatcher() - start() - } - } - - @After - fun tearDown() { - mockWebServer.shutdown() - featureSettingsHelper.resetAllFeatureFlags() - } - // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/249659 @SmokeTest @Test