From 6ea094b8e07f437beebdfb9807c52c24a84f1617 Mon Sep 17 00:00:00 2001 From: AndiAJ Date: Mon, 31 Oct 2022 16:02:49 +0200 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/26934 fix showDefaultHomeScreen screenshot test --- .../org/mozilla/fenix/screenshots/DefaultHomeScreenTest.kt | 1 - .../java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/screenshots/DefaultHomeScreenTest.kt b/app/src/androidTest/java/org/mozilla/fenix/screenshots/DefaultHomeScreenTest.kt index 8f5e632eb9..9a359314c1 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/screenshots/DefaultHomeScreenTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/screenshots/DefaultHomeScreenTest.kt @@ -43,7 +43,6 @@ class DefaultHomeScreenTest : ScreenshotTest() { @Test fun showDefaultHomeScreen() { homeScreen { - swipeToBottom() verifyAccountsSignInButton() Screengrab.screenshot("HomeScreenRobot_home-screen-scroll") TestAssetHelper.waitingTime diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt index f0362fff85..bd9e7817d5 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt @@ -706,9 +706,11 @@ private fun assertStartSyncHeader() { onView(allOf(withText(R.string.onboarding_account_sign_in_header))) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) } -private fun assertAccountsSignInButton() = +private fun assertAccountsSignInButton() { + scrollToElementByText(getStringResource(R.string.onboarding_firefox_account_sign_in)) onView(ViewMatchers.withResourceName("fxa_sign_in_button")) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) +} private fun assertChooseThemeHeader() { scrollToElementByText("Choose your theme")