|
|
|
@ -7,16 +7,20 @@ 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.HomeActivityIntentTestRule
|
|
|
|
|
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
|
|
|
|
import org.mozilla.fenix.helpers.SearchDispatcher
|
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.appContext
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.setTextToClipBoard
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
|
|
|
|
import org.mozilla.fenix.ui.robots.homeScreen
|
|
|
|
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
|
|
|
|
import org.mozilla.fenix.ui.util.ARABIC_LANGUAGE_HEADER
|
|
|
|
|
|
|
|
|
|
class SettingsSearchTest {
|
|
|
|
|
private lateinit var mockWebServer: MockWebServer
|
|
|
|
@ -383,4 +387,45 @@ class SettingsSearchTest {
|
|
|
|
|
verifyUrl("duckduckgo.com/?q=firefox")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Expected for app language set to Arabic
|
|
|
|
|
@Test
|
|
|
|
|
fun verifySearchEnginesWithRTLLocale() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openSettings {
|
|
|
|
|
}.openSearchSubMenu {
|
|
|
|
|
toggleShowSearchShortcuts()
|
|
|
|
|
}.goBack {
|
|
|
|
|
}.openLanguageSubMenu {
|
|
|
|
|
TestHelper.registerAndCleanupIdlingResources(
|
|
|
|
|
RecyclerViewIdlingResource(
|
|
|
|
|
activityTestRule.activity.findViewById(R.id.locale_list),
|
|
|
|
|
2,
|
|
|
|
|
),
|
|
|
|
|
) {
|
|
|
|
|
selectLanguage("Arabic")
|
|
|
|
|
verifyLanguageHeaderIsTranslated(ARABIC_LANGUAGE_HEADER)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
exitMenu()
|
|
|
|
|
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openSearch {
|
|
|
|
|
verifyTranslatedFocusedNavigationToolbar("ابحث أو أدخِل عنوانا")
|
|
|
|
|
verifySearchEngineShortcuts(
|
|
|
|
|
activityTestRule,
|
|
|
|
|
"Google",
|
|
|
|
|
"Bing",
|
|
|
|
|
"Amazon.com",
|
|
|
|
|
"DuckDuckGo",
|
|
|
|
|
"eBay",
|
|
|
|
|
/* Disabled Arabic Wikipedia verification
|
|
|
|
|
until https://github.com/mozilla-mobile/fenix/issues/12236 gets fixed
|
|
|
|
|
"ويكيبيديا (ar)"
|
|
|
|
|
*/
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|