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
fennec/nightly
mcarare 5 years ago committed by Jeff Boek
parent ef53e1ff8e
commit d2abac78eb

@ -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)))
}

@ -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() {

@ -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"

Loading…
Cancel
Save