1
0
Fork 0

For #6629 Align Private Browsing mode to UX specs

master
mcarare 2019-11-21 16:44:01 +02:00 committed by Jeff Boek
parent 7cd1d55e00
commit c5f18e0f96
6 changed files with 9 additions and 5 deletions

View File

@ -329,7 +329,7 @@ private fun assertStartBrowsingButton() =
// Private mode elements
private fun assertPrivateSessionHeader() =
onView(CoreMatchers.allOf(ViewMatchers.withText("Private session")))
onView(CoreMatchers.allOf(ViewMatchers.withText("Private tabs")))
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
const val PRIVATE_SESSION_MESSAGE = "Firefox Preview clears your search and browsing history " +

View File

@ -74,7 +74,7 @@ class LibrarySubMenusMultipleSelectionToolbarRobot {
fun clickOpenPrivateTab(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition {
openInPrivateTabButton().click()
mDevice.waitNotNull(
Until.findObject(By.text("Private session")),
Until.findObject(By.text("Private tabs")),
waitingTime
)

View File

@ -80,7 +80,7 @@ class TabHeaderViewHolder(
tabsMenu.isPrivate = isPrivate
val headerTextResourceId =
if (isPrivate) R.string.tabs_header_private_title else R.string.tab_header_label
if (isPrivate) R.string.tabs_header_private_tabs_title else R.string.tab_header_label
view.header_text.text = view.context.getString(headerTextResourceId)
view.share_tabs_button.isInvisible = !isPrivate || !hasTabs
view.close_tabs_button.isInvisible = !isPrivate || !hasTabs

View File

@ -7,7 +7,7 @@
android:id="@+id/private_session_description_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:layout_margin="0.5dp"
android:importantForAccessibility="no"
android:orientation="vertical">
<TextView
@ -16,6 +16,7 @@
android:layout_height="wrap_content"
android:ellipsize="none"
android:padding="4dp"
android:lineSpacingExtra="6dp"
android:gravity="center_vertical"
android:scrollHorizontally="false"
tools:text="@string/private_browsing_placeholder_description"
@ -26,6 +27,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="4dp"
android:lineSpacingExtra="6dp"
android:ellipsize="none"
android:gravity="center_vertical"
android:scrollHorizontally="false"

View File

@ -81,7 +81,7 @@
<color name="disabled_private_theme">#66FBFBFE</color>
<color name="scrimStart_private_theme">#F520123A</color>
<color name="scrimEnd_private_theme">#F515141A</color>
<color name="snackbar_private_theme">@color/accent_bright_private_theme</color>
<color name="snackbar_private_theme">@color/accent_light_theme</color>
<color name="accent_on_dark_background_private_theme">@color/accent_high_contrast_private_theme</color>
<color name="toolbar_start_gradient_private_theme">#7529A7</color>
<color name="toolbar_center_gradient_private_theme">#492E85</color>

View File

@ -372,6 +372,8 @@
<string name="tab_header_label">Open tabs</string>
<!-- Title for the list of tabs in the current private session -->
<string name="tabs_header_private_title">Private session</string>
<!-- Title for the list of tabs in the current private session -->
<string name="tabs_header_private_tabs_title">Private tabs</string>
<!-- Content description (not visible, for screen readers etc.): Add tab button. Adds a news tab when pressed -->
<string name="add_tab">Add tab</string>
<!-- Content description (not visible, for screen readers etc.): Close tab button. Closes the current session when pressed -->