For #24436 fix and re-enable home screen UI tests

upstream-sync
AndiAJ 2 years ago committed by mergify[bot]
parent 36c271cab3
commit 2171d47613

@ -14,6 +14,7 @@ import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
import org.mozilla.fenix.helpers.ext.waitNotNull
import org.mozilla.fenix.ui.robots.homeScreen
@ -33,6 +34,10 @@ class HomeScreenTest {
@get:Rule
val activityTestRule = HomeActivityTestRule()
@Rule
@JvmField
val retryTestRule = RetryTestRule(3)
@Test
fun homeScreenItemsTest() {
homeScreen { }.dismissOnboarding()
@ -93,7 +98,6 @@ class HomeScreenTest {
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/24436")
@Test
fun dismissOnboardingUsingSettingsTest() {
homeScreen {
@ -106,7 +110,6 @@ class HomeScreenTest {
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/24436")
@Test
fun dismissOnboardingUsingBookmarksTest() {
homeScreen {
@ -121,7 +124,6 @@ class HomeScreenTest {
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/24436")
@Test
fun dismissOnboardingUsingHelpTest() {
val settings = activityTestRule.activity.applicationContext.settings()
@ -136,7 +138,6 @@ class HomeScreenTest {
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/24436")
@Test
fun toolbarTapDoesntDismissOnboardingTest() {
homeScreen {

@ -48,6 +48,7 @@ import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort
import org.mozilla.fenix.helpers.TestHelper.appContext
import org.mozilla.fenix.helpers.TestHelper.appName
import org.mozilla.fenix.helpers.TestHelper.getStringResource
import org.mozilla.fenix.helpers.TestHelper.packageName
import org.mozilla.fenix.helpers.TestHelper.scrollToElementByText
import org.mozilla.fenix.helpers.click
@ -505,8 +506,13 @@ private fun verifySearchEngineIcon(searchEngineName: String) {
// First Run elements
private fun assertWelcomeHeader() =
onView(allOf(withText("Welcome to $appName!")))
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
assertTrue(
mDevice.findObject(
UiSelector().textContains(
getStringResource(R.string.onboarding_header)
)
).waitForExists(waitingTime)
)
private fun assertStartSyncHeader() {
scrollToElementByText(STRING_ONBOARDING_ACCOUNT_SIGN_IN_HEADER)

Loading…
Cancel
Save