Commit d2abac78 authored by mcarare's avatar mcarare Committed by Jeff Boek
Browse files

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
parent ef53e1ff
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)))
}

+1 −2
Original line number Diff line number Diff line
@@ -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() {
+1 −1
Original line number Diff line number Diff line
@@ -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"