|
|
|
@ -26,10 +26,12 @@ import org.junit.runner.RunWith
|
|
|
|
|
import org.mozilla.fenix.BrowserDirection
|
|
|
|
|
import org.mozilla.fenix.FenixApplication
|
|
|
|
|
import org.mozilla.fenix.HomeActivity
|
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
import org.mozilla.fenix.TestApplication
|
|
|
|
|
import org.mozilla.fenix.components.metrics.Event
|
|
|
|
|
import org.mozilla.fenix.components.searchengine.CustomSearchEngineStore.PREF_FILE_SEARCH_ENGINES
|
|
|
|
|
import org.mozilla.fenix.ext.metrics
|
|
|
|
|
import org.mozilla.fenix.ext.navigateSafe
|
|
|
|
|
import org.mozilla.fenix.ext.searchEngineManager
|
|
|
|
|
import org.mozilla.fenix.ext.settings
|
|
|
|
|
import org.mozilla.fenix.utils.Settings
|
|
|
|
@ -271,6 +273,7 @@ class SearchInteractorTest {
|
|
|
|
|
val store: SearchFragmentStore = mockk()
|
|
|
|
|
|
|
|
|
|
every { store.state } returns mockk(relaxed = true)
|
|
|
|
|
every { navController.currentDestination?.id } returns R.id.searchFragment
|
|
|
|
|
|
|
|
|
|
val searchController: SearchController = DefaultSearchController(
|
|
|
|
|
mockk(),
|
|
|
|
@ -286,7 +289,10 @@ class SearchInteractorTest {
|
|
|
|
|
interactor.onClickSearchEngineSettings()
|
|
|
|
|
|
|
|
|
|
verify {
|
|
|
|
|
navController.navigate(SearchFragmentDirections.actionSearchFragmentToSearchEngineFragment())
|
|
|
|
|
navController.navigateSafe(
|
|
|
|
|
R.id.searchFragment,
|
|
|
|
|
SearchFragmentDirections.actionSearchFragmentToSearchEngineFragment()
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|