|
|
@ -48,6 +48,9 @@ import org.mozilla.fenix.ui.robots.notificationShade
|
|
|
|
import org.mozilla.fenix.ui.robots.openEditURLView
|
|
|
|
import org.mozilla.fenix.ui.robots.openEditURLView
|
|
|
|
import org.mozilla.fenix.ui.robots.searchScreen
|
|
|
|
import org.mozilla.fenix.ui.robots.searchScreen
|
|
|
|
import org.mozilla.fenix.ui.robots.tabDrawer
|
|
|
|
import org.mozilla.fenix.ui.robots.tabDrawer
|
|
|
|
|
|
|
|
import org.mozilla.fenix.ui.util.FRENCH_LANGUAGE_HEADER
|
|
|
|
|
|
|
|
import org.mozilla.fenix.ui.util.FRENCH_SYSTEM_LOCALE_OPTION
|
|
|
|
|
|
|
|
import org.mozilla.fenix.ui.util.ROMANIAN_LANGUAGE_HEADER
|
|
|
|
import org.mozilla.fenix.ui.util.STRING_ONBOARDING_TRACKING_PROTECTION_HEADER
|
|
|
|
import org.mozilla.fenix.ui.util.STRING_ONBOARDING_TRACKING_PROTECTION_HEADER
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -66,6 +69,7 @@ class SmokeTest {
|
|
|
|
private val downloadFileName = "Globe.svg"
|
|
|
|
private val downloadFileName = "Globe.svg"
|
|
|
|
private val collectionName = "First Collection"
|
|
|
|
private val collectionName = "First Collection"
|
|
|
|
private var bookmarksListIdlingResource: RecyclerViewIdlingResource? = null
|
|
|
|
private var bookmarksListIdlingResource: RecyclerViewIdlingResource? = null
|
|
|
|
|
|
|
|
private var localeListIdlingResource: RecyclerViewIdlingResource? = null
|
|
|
|
private val customMenuItem = "TestMenuItem"
|
|
|
|
private val customMenuItem = "TestMenuItem"
|
|
|
|
|
|
|
|
|
|
|
|
// This finds the dialog fragment child of the homeFragment, otherwise the awesomeBar would return null
|
|
|
|
// This finds the dialog fragment child of the homeFragment, otherwise the awesomeBar would return null
|
|
|
@ -133,6 +137,10 @@ class SmokeTest {
|
|
|
|
if (readerViewNotification != null) {
|
|
|
|
if (readerViewNotification != null) {
|
|
|
|
IdlingRegistry.getInstance().unregister(readerViewNotification)
|
|
|
|
IdlingRegistry.getInstance().unregister(readerViewNotification)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (localeListIdlingResource != null) {
|
|
|
|
|
|
|
|
IdlingRegistry.getInstance().unregister(localeListIdlingResource)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Verifies the first run onboarding screen
|
|
|
|
// Verifies the first run onboarding screen
|
|
|
@ -1375,4 +1383,26 @@ class SmokeTest {
|
|
|
|
verifyPastedToolbarText("Page content: 1")
|
|
|
|
verifyPastedToolbarText("Page content: 1")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
fun switchLanguageTest() {
|
|
|
|
|
|
|
|
homeScreen {
|
|
|
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
|
|
|
}.openSettings {
|
|
|
|
|
|
|
|
}.openLanguageSubMenu {
|
|
|
|
|
|
|
|
localeListIdlingResource =
|
|
|
|
|
|
|
|
RecyclerViewIdlingResource(
|
|
|
|
|
|
|
|
activityTestRule.activity.findViewById(R.id.locale_list),
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
IdlingRegistry.getInstance().register(localeListIdlingResource)
|
|
|
|
|
|
|
|
selectLanguage("Romanian")
|
|
|
|
|
|
|
|
verifyLanguageHeaderIsTranslated(ROMANIAN_LANGUAGE_HEADER)
|
|
|
|
|
|
|
|
selectLanguage("Français")
|
|
|
|
|
|
|
|
verifyLanguageHeaderIsTranslated(FRENCH_LANGUAGE_HEADER)
|
|
|
|
|
|
|
|
selectLanguage(FRENCH_SYSTEM_LOCALE_OPTION)
|
|
|
|
|
|
|
|
verifyLanguageHeaderIsTranslated("Language")
|
|
|
|
|
|
|
|
IdlingRegistry.getInstance().unregister(localeListIdlingResource)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|