|
|
|
@ -9,11 +9,10 @@ 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.ext.settings
|
|
|
|
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
|
|
|
|
import org.mozilla.fenix.helpers.FeatureSettingsHelper
|
|
|
|
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
|
|
|
|
import org.mozilla.fenix.ui.robots.browserScreen
|
|
|
|
@ -34,13 +33,17 @@ class CollectionTest {
|
|
|
|
|
private lateinit var mockWebServer: MockWebServer
|
|
|
|
|
private val firstCollectionName = "testcollection_1"
|
|
|
|
|
private val secondCollectionName = "testcollection_2"
|
|
|
|
|
private val featureSettingsHelper = FeatureSettingsHelper()
|
|
|
|
|
|
|
|
|
|
@get:Rule
|
|
|
|
|
val activityTestRule = HomeActivityTestRule()
|
|
|
|
|
|
|
|
|
|
@Before
|
|
|
|
|
fun setUp() {
|
|
|
|
|
activityTestRule.activity.applicationContext.settings().shouldShowJumpBackInCFR = false
|
|
|
|
|
// disabling these features to have better visibility of Collections
|
|
|
|
|
featureSettingsHelper.setRecentTabsFeatureEnabled(false)
|
|
|
|
|
featureSettingsHelper.setPocketEnabled(false)
|
|
|
|
|
featureSettingsHelper.setJumpBackCFREnabled(false)
|
|
|
|
|
|
|
|
|
|
mockWebServer = MockWebServer().apply {
|
|
|
|
|
dispatcher = AndroidAssetDispatcher()
|
|
|
|
@ -51,6 +54,9 @@ class CollectionTest {
|
|
|
|
|
@After
|
|
|
|
|
fun tearDown() {
|
|
|
|
|
mockWebServer.shutdown()
|
|
|
|
|
|
|
|
|
|
// resetting modified features enabled setting to default
|
|
|
|
|
featureSettingsHelper.resetAllFeatureFlags()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@ -81,7 +87,6 @@ class CollectionTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
@Ignore("https://github.com/mozilla-mobile/fenix/issues/21397")
|
|
|
|
|
fun verifyAddTabButtonOfCollectionMenu() {
|
|
|
|
|
val firstWebPage = getGenericAsset(mockWebServer, 1)
|
|
|
|
|
val secondWebPage = getGenericAsset(mockWebServer, 2)
|
|
|
|
@ -108,7 +113,6 @@ class CollectionTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
@Ignore("https://github.com/mozilla-mobile/fenix/issues/21397")
|
|
|
|
|
fun renameCollectionTest() {
|
|
|
|
|
val webPage = getGenericAsset(mockWebServer, 1)
|
|
|
|
|
|
|
|
|
|