From c95b49df11679775edb7a463be7297298cbb8ce1 Mon Sep 17 00:00:00 2001 From: Sammy Khamis Date: Thu, 13 Oct 2022 09:24:26 -1000 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/27117 - Update copy for the menu from "Sign in to sync" to "Sync and save data" --- .../fenix/ui/robots/SettingsSubMenuLoginsAndPasswordRobot.kt | 2 +- .../java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt | 4 ++-- .../mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt | 2 +- app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt | 2 +- app/src/main/res/values/strings.xml | 4 +++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuLoginsAndPasswordRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuLoginsAndPasswordRobot.kt index 103f6e5fe..ddb1ff91b 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuLoginsAndPasswordRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuLoginsAndPasswordRobot.kt @@ -110,5 +110,5 @@ private fun assertDefaultValueAutofillLogins(context: Context) = onView( private fun assertDefaultValueExceptions() = onView(ViewMatchers.withText("Exceptions")) .check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))) -private fun assertDefaultValueSyncLogins() = onView(ViewMatchers.withText("Sign in to Sync")) +private fun assertDefaultValueSyncLogins() = onView(ViewMatchers.withText("Sync and save data")) .check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt index 865e17ada..d8f11ee79 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt @@ -173,7 +173,7 @@ class ThreeDotMenuMainRobot { fun openSyncSignIn(interact: SyncSignInRobot.() -> Unit): SyncSignInRobot.Transition { threeDotMenuRecyclerView().perform(swipeDown()) - mDevice.waitNotNull(Until.findObject(By.text("Sign in to sync")), waitingTime) + mDevice.waitNotNull(Until.findObject(By.text("Sync and save data")), waitingTime) signInToSyncButton().click() SyncSignInRobot().interact() @@ -440,7 +440,7 @@ private fun bookmarksButton() = onView(allOf(withText(R.string.library_bookmarks private fun assertBookmarksButton() = bookmarksButton() .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) -private fun signInToSyncButton() = onView(withText("Sign in to sync")) +private fun signInToSyncButton() = onView(withText("Sync and save data")) private fun assertSignInToSyncButton() = signInToSyncButton().check(matches(isDisplayed())) private fun helpButton() = onView(allOf(withText(R.string.browser_menu_help))) diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index 385ec50d1..e1cf0ff2e 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -352,7 +352,7 @@ open class DefaultToolbarMenu( private fun syncMenuItem(): BrowserMenuImageText? { val syncItemTitle = if (context.components.backgroundServices.accountManagerAvailableQueue.isReady()) { - accountManager.accountProfileEmail ?: context.getString(R.string.sync_menu_sign_in) + accountManager.accountProfileEmail ?: context.getString(R.string.sync_menu_sync_and_save_data) } else { null } diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt index 60a28586f..a5425ad61 100644 --- a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt @@ -100,7 +100,7 @@ class HomeMenu( private fun syncSignInMenuItem(): BrowserMenuImageText? { val syncItemTitle = if (context.components.backgroundServices.accountManagerAvailableQueue.isReady()) { - accountManager.accountProfileEmail ?: context.getString(R.string.sync_menu_sign_in) + accountManager.accountProfileEmail ?: context.getString(R.string.sync_menu_sync_and_save_data) } else { null } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 97f13d4a4..8ed348ef6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1043,9 +1043,11 @@ Copied to clipboard - Sign in to sync + Sign in to sync Sign in to Sync + + Sync and save data Send to all devices