For 7077 Simplify Display Url
parent
9059a6b465
commit
47b2f6a070
|
@ -83,7 +83,7 @@ class TopSitesTest {
|
|||
verifyExistingTopSitesTabs(defaultWebPageTitle)
|
||||
}.openTopSiteTabWithTitle(title = defaultWebPageTitle) {
|
||||
verifyPageContent(defaultWebPage.content)
|
||||
verifyUrl(defaultWebPage.url.toString())
|
||||
verifyUrl(defaultWebPage.url.toString().replace("http://", ""))
|
||||
}.openHomeScreen {
|
||||
verifyExistingTopSitesList()
|
||||
verifyExistingTopSitesTabs(defaultWebPageTitle)
|
||||
|
|
|
@ -57,19 +57,19 @@ class BrowserRobot {
|
|||
)
|
||||
TestAssetHelper.waitingTime
|
||||
onView(withId(R.id.mozac_browser_toolbar_url_view))
|
||||
.check(matches(withText(containsString(url))))
|
||||
.check(matches(withText(containsString(url.replace("http://", "")))))
|
||||
}
|
||||
|
||||
fun verifyHelpUrl() {
|
||||
verifyUrl("https://support.mozilla.org/")
|
||||
verifyUrl("support.mozilla.org/")
|
||||
}
|
||||
|
||||
fun verifyWhatsNewURL() {
|
||||
verifyUrl("https://support.mozilla.org/")
|
||||
verifyUrl("support.mozilla.org/")
|
||||
}
|
||||
|
||||
fun verifyRateOnGooglePlayURL() {
|
||||
verifyUrl("https://play.google.com/store/apps/details?id=org.mozilla.fenix")
|
||||
verifyUrl("play.google.com/store/apps/details?id=org.mozilla.fenix")
|
||||
}
|
||||
|
||||
/* Asserts that the text within DOM element with ID="testContent" has the given text, i.e.
|
||||
|
|
|
@ -138,10 +138,10 @@ private fun clearButton() = onView(withId(R.id.mozac_browser_toolbar_clear_view)
|
|||
|
||||
private fun assertSearchEngineURL(searchEngineName: String) {
|
||||
mDevice.waitNotNull(
|
||||
Until.findObject(By.textContains("https://${searchEngineName.toLowerCase()}.com/?q=mozilla")),
|
||||
Until.findObject(By.textContains("${searchEngineName.toLowerCase()}.com/?q=mozilla")),
|
||||
TestAssetHelper.waitingTime
|
||||
)
|
||||
onView(allOf(withText(startsWith("https://${searchEngineName.toLowerCase()}.com"))))
|
||||
onView(allOf(withText(startsWith("${searchEngineName.toLowerCase()}.com"))))
|
||||
.check(matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import mozilla.components.browser.session.Session
|
|||
import mozilla.components.browser.toolbar.BrowserToolbar
|
||||
import mozilla.components.browser.toolbar.display.DisplayToolbar
|
||||
import mozilla.components.support.ktx.android.util.dpToFloat
|
||||
import mozilla.components.support.utils.URLStringUtils
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.FenixSnackbar
|
||||
import org.mozilla.fenix.customtabs.CustomTabToolbarIntegration
|
||||
|
@ -166,6 +167,8 @@ class BrowserToolbarView(
|
|||
ThemeManager.resolveAttribute(R.attr.toolbarDivider, container.context)
|
||||
)
|
||||
|
||||
display.urlFormatter = { url -> URLStringUtils.toDisplayUrl(url) }
|
||||
|
||||
display.colors = display.colors.copy(
|
||||
text = primaryTextColor,
|
||||
securityIconSecure = primaryTextColor,
|
||||
|
|
Loading…
Reference in New Issue