Merge remote-tracking branch 'origin/fenix/117.0.1' into iceraven

pull/700/head
akliuxingyuan 9 months ago
commit 1ab4fe4471

@ -631,8 +631,8 @@ dependencies {
implementation FenixDependencies.androidx_paging
implementation ComponentsDependencies.androidx_preferences
implementation ComponentsDependencies.androidx_fragment
implementation ComponentsDependencies.androidx_navigation_fragment
implementation ComponentsDependencies.androidx_navigation_ui
implementation FenixDependencies.androidx_navigation_fragment
implementation FenixDependencies.androidx_navigation_ui
implementation ComponentsDependencies.androidx_recyclerview
implementation FenixDependencies.androidx_lifecycle_common
implementation ComponentsDependencies.androidx_lifecycle_livedata

@ -58,6 +58,7 @@ class ComposeSearchTest {
isRecentTabsFeatureEnabled = false,
isTCPCFREnabled = false,
isWallpaperOnboardingEnabled = false,
isCookieBannerReductionDialogEnabled = false,
tabsTrayRewriteEnabled = true,
),
) { it.activity }

@ -17,7 +17,6 @@ import mozilla.components.concept.engine.mediasession.MediaSession
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.IntentReceiverActivity
@ -116,13 +115,12 @@ class ComposeSmokeTest {
// Device or AVD requires a Google Services Android OS installation with Play Store installed
// Verifies the Open in app button when an app is installed
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1849278")
@Test
fun mainMenuOpenInAppTest() {
val youtubeURL = "https://m.youtube.com/user/mozilla?cbrd=1"
val youtubeURL = "vnd.youtube://".toUri()
navigationToolbar {
}.enterURLAndEnterToBrowser(youtubeURL.toUri()) {
}.enterURLAndEnterToBrowser(youtubeURL) {
verifyNotificationDotOnMainMenu()
}.openThreeDotMenu {
}.clickOpenInApp {

@ -54,7 +54,7 @@ import org.mozilla.fenix.ui.robots.searchScreen
*/
class SearchTest {
lateinit var searchMockServer: MockWebServer
private lateinit var searchMockServer: MockWebServer
private var queryString = "firefox"
private val generalEnginesList = listOf("DuckDuckGo", "Google", "Bing")
private val topicEnginesList = listOf("Amazon.com", "Wikipedia", "eBay")
@ -68,6 +68,8 @@ class SearchTest {
isRecentTabsFeatureEnabled = false,
isTCPCFREnabled = false,
isWallpaperOnboardingEnabled = false,
isCookieBannerReductionDialogEnabled = false,
tabsTrayRewriteEnabled = false,
),
) { it.activity }

@ -17,7 +17,6 @@ import mozilla.components.concept.engine.mediasession.MediaSession
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.IntentReceiverActivity
@ -115,13 +114,12 @@ class SmokeTest {
// Device or AVD requires a Google Services Android OS installation with Play Store installed
// Verifies the Open in app button when an app is installed
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1849278")
@Test
fun mainMenuOpenInAppTest() {
val youtubeURL = "https://m.youtube.com/user/mozilla?cbrd=1"
val youtubeURL = "vnd.youtube://".toUri()
navigationToolbar {
}.enterURLAndEnterToBrowser(youtubeURL.toUri()) {
}.enterURLAndEnterToBrowser(youtubeURL) {
verifyNotificationDotOnMainMenu()
}.openThreeDotMenu {
}.clickOpenInApp {

@ -163,17 +163,6 @@ class WebControlsTest {
}
}
@Test
fun externalLinkTest() {
val externalLinksPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(externalLinksPage.url) {
clickPageObject(itemContainingText("External link"))
verifyUrl("duckduckgo")
}
}
@Test
fun emailLinkTest() {
val externalLinksPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)

@ -67,7 +67,7 @@ fun NavController.navigateWithBreadcrumb(
*/
@SuppressLint("RestrictedApi")
fun NavController.hasTopDestination(fragmentClassName: String): Boolean {
return this.currentBackStackEntry?.destination?.displayName?.contains(
return this.backQueue.lastOrNull()?.destination?.displayName?.contains(
fragmentClassName,
true,
) == true

@ -1027,7 +1027,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
internal fun getPreviousDestination(): NavBackStackEntry? {
// This duplicates the platform functionality for "previousBackStackEntry" but additionally skips this entry.
val descendingEntries = findNavController().currentBackStack.value.reversed().iterator()
val descendingEntries = findNavController().backQueue.reversed().iterator()
// Throw the topmost destination away.
if (descendingEntries.hasNext()) {
descendingEntries.next()

@ -142,7 +142,7 @@
"channel": "release",
"userFacingName": "Felt Privacy - Android",
"userFacingDescription": "Copy focused on privacy",
"isEnrollmentPaused": false,
"isEnrollmentPaused": true,
"isRollout": false,
"bucketConfig": {
"randomizationUnit": "nimbus_id",
@ -216,7 +216,7 @@
],
"targeting": "((is_already_enrolled) || ((isFirstRun == 'true') && (app_version|versionCompare('116.!') >= 0) && (language in ['en'])))",
"startDate": "2023-08-09",
"enrollmentEndDate": "2023-08-29",
"enrollmentEndDate": "2023-08-30",
"endDate": null,
"proposedDuration": 28,
"proposedEnrollment": 14,
@ -282,103 +282,6 @@
"localizations": null,
"locales": null
},
{
"schemaVersion": "1.12.0",
"slug": "on-boarding-challenge-the-default",
"id": "on-boarding-challenge-the-default",
"arguments": {},
"application": "org.mozilla.firefox",
"appName": "fenix",
"appId": "org.mozilla.firefox",
"channel": "release",
"userFacingName": "On-boarding Challenge the Default",
"userFacingDescription": "Testing copy and images in the first run onboarding that is consistent with marketing messaging.",
"isEnrollmentPaused": true,
"isRollout": false,
"bucketConfig": {
"randomizationUnit": "nimbus_id",
"namespace": "fenix-juno-onboarding-release-3",
"start": 0,
"count": 10000,
"total": 10000
},
"featureIds": [
"juno-onboarding"
],
"probeSets": [],
"outcomes": [
{
"slug": "default-browser",
"priority": "primary"
}
],
"branches": [
{
"slug": "control",
"ratio": 1,
"feature": {
"featureId": "this-is-included-for-mobile-pre-96-support",
"enabled": false,
"value": {}
},
"features": [
{
"featureId": "juno-onboarding",
"enabled": true,
"value": {
"enabled": true
}
}
]
},
{
"slug": "treatment-a",
"ratio": 1,
"feature": {
"featureId": "this-is-included-for-mobile-pre-96-support",
"enabled": false,
"value": {}
},
"features": [
{
"featureId": "juno-onboarding",
"enabled": true,
"value": {
"enabled": true,
"cards": {
"default-browser": {
"title": "Du entscheidest, was Standard ist",
"body": "Nimm nicht das Erstbeste, sondern das Beste für dich: Firefox schützt deine Privatsphäre.\n\nLies unseren Datenschutzhinweis.",
"link-text": "Datenschutzhinweis",
"image-res": "onboarding_ctd_default_browser"
},
"sync-sign-in": {
"title": "Alles ist dort, wo du es brauchst",
"body": "Wenn du willst, bringt Firefox deine Tabs und Passwörter auf all deine Geräte.",
"image-res": "onboarding_ctd_sync"
},
"notification-permission": {
"title": "Du bestimmst, was Firefox kann",
"body": "Benachrichtigungen helfen dabei, Downloads zu managen und Tabs zwischen Geräten zu senden.",
"image-res": "onboarding_ctd_notification"
}
}
}
}
]
}
],
"targeting": "((is_already_enrolled) || ((isFirstRun == 'true') && (app_version|versionCompare('115.!') >= 0) && (language in ['de']) && (region in ['DE'])))",
"startDate": "2023-06-21",
"enrollmentEndDate": "2023-08-09",
"endDate": null,
"proposedDuration": 30,
"proposedEnrollment": 14,
"referenceBranch": "control",
"featureValidationOptOut": false,
"localizations": null,
"locales": null
},
{
"schemaVersion": "1.12.0",
"slug": "release-android-onboarding-redesign-treatment-a-rollout",

@ -50,14 +50,14 @@ internal class SearchDialogFragmentTest {
@Test
fun `GIVEN this is the only visible fragment WHEN asking for the previous destination THEN return null`() {
every { navController.currentBackStack.value } returns ArrayDeque(listOf(getDestination(fragmentName)))
every { navController.backQueue } returns ArrayDeque(listOf(getDestination(fragmentName)))
assertNull(fragment.getPreviousDestination())
}
@Test
fun `GIVEN this and FragmentB on top of this are visible WHEN asking for the previous destination THEN return null`() {
every { navController.currentBackStack.value } returns ArrayDeque(
every { navController.backQueue } returns ArrayDeque(
listOf(
getDestination(fragmentName),
getDestination("FragmentB"),
@ -70,7 +70,7 @@ internal class SearchDialogFragmentTest {
@Test
fun `GIVEN FragmentA, this and FragmentB are visible WHEN asking for the previous destination THEN return FragmentA`() {
val fragmentADestination = getDestination("FragmentA")
every { navController.currentBackStack.value } returns ArrayDeque(
every { navController.backQueue } returns ArrayDeque(
listOf(
fragmentADestination,
getDestination(fragmentName),
@ -84,7 +84,7 @@ internal class SearchDialogFragmentTest {
@Test
fun `GIVEN FragmentA and this on top of it are visible WHEN asking for the previous destination THEN return FragmentA`() {
val fragmentADestination = getDestination("FragmentA")
every { navController.currentBackStack.value } returns ArrayDeque(
every { navController.backQueue } returns ArrayDeque(
listOf(
fragmentADestination,
getDestination(fragmentName),

@ -71,7 +71,7 @@ buildscript {
classpath ComponentsDependencies.tools_androidgradle
classpath ComponentsDependencies.tools_kotlingradle
classpath FenixDependencies.tools_benchmarkgradle
classpath ComponentsDependencies.androidx_safeargs
classpath FenixDependencies.androidx_safeargs
classpath FenixDependencies.osslicenses_plugin
classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}"
classpath "${ApplicationServicesConfig.groupId}:tooling-nimbus-gradle:${ApplicationServicesConfig.version}"

@ -23,6 +23,7 @@ object FenixVersions {
const val androidx_profileinstaller = "1.3.1"
const val androidx_legacy = "1.0.0"
const val androidx_lifecycle = "2.6.1"
const val androidx_navigation = "2.5.3"
const val androidx_splash_screen = "1.0.1"
const val androidx_paging = "3.1.1"
const val androidx_transition = "1.4.1"
@ -56,6 +57,9 @@ object FenixDependencies {
const val androidx_legacy = "androidx.legacy:legacy-support-v4:${FenixVersions.androidx_legacy}"
const val androidx_lifecycle_common = "androidx.lifecycle:lifecycle-common:${FenixVersions.androidx_lifecycle}"
const val androidx_paging = "androidx.paging:paging-runtime-ktx:${FenixVersions.androidx_paging}"
const val androidx_safeargs = "androidx.navigation:navigation-safe-args-gradle-plugin:${FenixVersions.androidx_navigation}"
const val androidx_navigation_fragment = "androidx.navigation:navigation-fragment-ktx:${FenixVersions.androidx_navigation}"
const val androidx_navigation_ui = "androidx.navigation:navigation-ui:${FenixVersions.androidx_navigation}"
const val androidx_transition = "androidx.transition:transition:${FenixVersions.androidx_transition}"
const val androidx_datastore = "androidx.datastore:datastore:${FenixVersions.androidx_datastore}"

Loading…
Cancel
Save