1
0
Fork 0

For #7075 Update passwords preference visibility and string

Set visibility for feature flags before settings screen it's displayed.
Change string for preference to match existing header string.
Update UI Tests
master
mcarare 2019-12-11 17:14:39 +02:00 committed by Jeff Boek
parent ef53e1ff8e
commit d2abac78eb
3 changed files with 4 additions and 5 deletions

View File

@ -156,8 +156,8 @@ private fun assertEnhancedTrackingProtectionValue() = onView(ViewMatchers.withTe
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
private fun assertLoginsButton() {
TestHelper.scrollToElementByText("Passwords")
onView(ViewMatchers.withText("Passwords"))
TestHelper.scrollToElementByText("Logins and passwords")
onView(ViewMatchers.withText("Logins and passwords"))
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
}

View File

@ -109,6 +109,7 @@ class SettingsFragment : PreferenceFragmentCompat(), AccountObserver {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.preferences, rootKey)
updatePreferenceVisibilityForFeatureFlags()
}
override fun onResume() {
@ -167,8 +168,6 @@ class SettingsFragment : PreferenceFragmentCompat(), AccountObserver {
context!!,
requireComponents.backgroundServices.accountManager.accountProfile()
)
updatePreferenceVisibilityForFeatureFlags()
}
private fun updatePreferenceVisibilityForFeatureFlags() {

View File

@ -67,7 +67,7 @@
app:isPreferenceVisible="false"
android:icon="@drawable/ic_login"
android:key="@string/pref_key_passwords"
android:title="@string/preferences_passwords" />
android:title="@string/preferences_passwords_logins_and_passwords" />
<androidx.preference.Preference
android:icon="@drawable/ic_private_browsing"
android:key="@string/pref_key_add_private_browsing_shortcut"