Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #11229: Update onboarding ETP copy.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarare authored and ekager committed Jun 5, 2020
1 parent 52c2fdb commit a0d9189
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ class HomeScreenTest {
verifyWhatsNewHeader()
verifyWhatsNewLink()

// Protect yourself
scrollToElementByText("Protect yourself")
verifyProtectYourselfHeader()
// Automatic privacy
scrollToElementByText("Automatic privacy")
verifyAutomaticPrivacyfHeader()
verifyTrackingProtectionToggle()
verifyProtectYourselfText()
verifyAutomaticPrivacyText()

/* Check disable due to Firebase failures on Pixel 2 API 28
// Choose your theme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class HomeScreenRobot {
fun verifyDarkThemeDescription() = assertDarkThemeDescription()
fun verifyAutomaticThemeToggle() = assertAutomaticThemeToggle()
fun verifyAutomaticThemeDescription() = assertAutomaticThemeDescription()
fun verifyProtectYourselfHeader() = assertProtectYourselfHeader()
fun verifyAutomaticPrivacyfHeader() = assertAutomaticPrivacyHeader()
fun verifyTrackingProtectionToggle() = assertTrackingProtectionToggle()
fun verifyProtectYourselfText() = assertProtectYourselfText()
fun verifyAutomaticPrivacyText() = assertAutomaticPrivacyText()

// What's new elements
fun verifyWhatsNewHeader() = assertWhatsNewHeather()
Expand Down Expand Up @@ -593,20 +593,20 @@ private fun assertAutomaticThemeDescription() =
onView(allOf(withText("Automatic")))
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))

private fun assertProtectYourselfHeader() =
onView(allOf(withText("Protect yourself")))
private fun assertAutomaticPrivacyHeader() =
onView(allOf(withText("Automatic privacy")))
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))

private fun assertTrackingProtectionToggle() = onView(
allOf(ViewMatchers.withResourceName("tracking_protection_toggle"))
)
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))

private fun assertProtectYourselfText() {
private fun assertAutomaticPrivacyText() {
onView(
allOf(
withText(
"Firefox Preview helps stop websites from tracking you online."
"Privacy and security settings block trackers, malware, and companies that follow you."
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ class OnboardingTrackingProtectionViewHolder(view: View) : RecyclerView.ViewHold
standardTrackingProtection = view.tracking_protection_standard_option
strictTrackingProtection = view.tracking_protection_strict_default

val appName = view.context.getString(R.string.app_name)
view.description_text.text = view.context.getString(
R.string.onboarding_tracking_protection_description1,
appName
R.string.onboarding_tracking_protection_description_2
)

trackingProtectionToggle.apply {
Expand Down Expand Up @@ -65,10 +63,10 @@ class OnboardingTrackingProtectionViewHolder(view: View) : RecyclerView.ViewHold
standardTrackingProtection.performClick()
}
val standardTitle = view.context.getString(
R.string.onboarding_tracking_protection_standard_button
R.string.onboarding_tracking_protection_standard_button_2
)
val standardSummary = view.context.getString(
R.string.onboarding_tracking_protection_standard_button_description
R.string.onboarding_tracking_protection_standard_button_description_2
)
contentDescription = "$standardTitle. $standardSummary"
}
Expand All @@ -84,7 +82,7 @@ class OnboardingTrackingProtectionViewHolder(view: View) : RecyclerView.ViewHold
val strictTitle =
view.context.getString(R.string.onboarding_tracking_protection_strict_button)
val strictSummary =
view.context.getString(R.string.onboarding_tracking_protection_strict_button_description)
view.context.getString(R.string.onboarding_tracking_protection_strict_button_description_2)
contentDescription = "$strictTitle. $strictSummary"
}
}
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/onboarding_tracking_protection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:drawablePadding="12dp"
android:gravity="center_vertical"
android:lines="1"
android:text="@string/onboarding_tracking_protection_header"
android:text="@string/onboarding_tracking_protection_header_2"
android:textAppearance="@style/HeaderTextStyle"
app:layout_constraintEnd_toStartOf="@id/tracking_protection_toggle"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -43,7 +43,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/header_text"
tools:text="@string/onboarding_tracking_protection_description1" />
tools:text="@string/onboarding_tracking_protection_description_2" />

<View
android:id="@+id/clickable_region_standard"
Expand Down Expand Up @@ -74,7 +74,7 @@
android:id="@+id/protection_standard_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onboarding_tracking_protection_standard_button"
android:text="@string/onboarding_tracking_protection_standard_button_2"
android:textColor="@color/primary_state_list_text_color"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/tracking_protection_standard_option"
Expand All @@ -84,7 +84,7 @@
android:id="@+id/protection_standard_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/onboarding_tracking_protection_standard_button_description"
android:text="@string/onboarding_tracking_protection_standard_button_description_2"
android:textColor="@color/secondary_state_list_text_color"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
Expand Down Expand Up @@ -131,7 +131,7 @@
android:id="@+id/protection_strict_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/onboarding_tracking_protection_strict_button_description"
android:text="@string/onboarding_tracking_protection_strict_button_description_2"
android:textColor="@color/secondary_state_list_text_color"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -935,20 +935,20 @@
<!-- text to display in the snackbar if automatic sign-in fails. user may try again -->
<string name="onboarding_firefox_account_automatic_signin_failed">Failed to sign-in</string>
<!-- text for the tracking protection onboarding card header -->
<string name="onboarding_tracking_protection_header">Protect yourself</string>
<string name="onboarding_tracking_protection_header_2">Automatic privacy</string>
<!-- text for the tracking protection card description
The first parameter is the name of the app (e.g. Firefox Preview) -->
<string name="onboarding_tracking_protection_description1">%s helps stop websites from tracking you online.</string>
<string name="onboarding_tracking_protection_description_2">Privacy and security settings block trackers, malware, and companies that follow you.</string>
<!-- text for tracking protection radio button option for standard level of blocking -->
<string name="onboarding_tracking_protection_standard_button">Standard</string>
<string name="onboarding_tracking_protection_standard_button_2">Standard (default)</string>
<!-- text for standard blocking option button description -->
<string name="onboarding_tracking_protection_standard_button_description">Blocks fewer trackers but allows pages to load normally</string>
<string name="onboarding_tracking_protection_standard_button_description_2">Blocks fewer trackers. Pages will load normally.</string>
<!-- text for tracking protection radio button option for strict level of blocking -->
<string name="onboarding_tracking_protection_strict_button">Strict (recommended)</string>
<!-- text for tracking protection radio button option for strict level of blocking -->
<string name="onboarding_tracking_protection_strict_option">Strict</string>
<!-- text for strict blocking option button description -->
<string name="onboarding_tracking_protection_strict_button_description">Blocks more trackers for better protection and performance, but may cause some sites to not work properly</string>
<string name="onboarding_tracking_protection_strict_button_description_2">Blocks more trackers, ads, and popups. Pages load faster, but some functionality might not work.</string>
<!-- text for the toolbar position card header
In English this is an idiom for "choose a side as in an argument or fight"
but it is ok to make this more literally about "choosing a position in a physical space -->
Expand Down

0 comments on commit a0d9189

Please sign in to comment.