From 98a33ea82b3a96d52a6cb82c56ff5680a660eb60 Mon Sep 17 00:00:00 2001 From: James Hugman Date: Fri, 10 Jul 2020 13:51:11 +0100 Subject: [PATCH] Changed home_* style links to urls_* to reflect that the destination is a set of links, rather than where the screen is --- .../androidTest/java/org/mozilla/fenix/ui/DeepLinkTest.kt | 4 ++-- .../java/org/mozilla/fenix/ui/robots/DeepLinkRobot.kt | 4 ++-- .../mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt | 4 ++-- .../fenix/home/intent/DeepLinkIntentProcessorTest.kt | 8 ++++---- docs/mma.md | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/DeepLinkTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/DeepLinkTest.kt index 59e5bb7cb..f73a452d0 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/DeepLinkTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/DeepLinkTest.kt @@ -24,8 +24,8 @@ import org.mozilla.fenix.ui.robots.DeepLinkRobot * - fenix://settings_privacy — take the user to the privacy settings page. * - fenix://settings_search_engine — take the user to the search engine page, to set the default search engine. * - fenix://home_collections — take the user to the home screen to see the list of collections. - * - fenix://home_history — take the user to the history list. - * - fenix://home_bookmarks — take the user to the bookmarks list + * - fenix://urls_history — take the user to the history list. + * - fenix://urls_bookmarks — take the user to the bookmarks list * - fenix://settings_logins — take the user to the settings page to do with logins (not the saved logins). **/ class DeepLinkTest { diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/DeepLinkRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/DeepLinkRobot.kt index 5d0cfa6b3..f3a74523d 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/DeepLinkRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/DeepLinkRobot.kt @@ -45,10 +45,10 @@ class DeepLinkRobot { openDeepLink("fenix://home").run { homeScreen(interact) } fun openBookmarks(interact: BookmarksRobot.() -> Unit) = - openDeepLink("fenix://home_bookmarks").run { bookmarksMenu(interact) } + openDeepLink("fenix://urls_bookmarks").run { bookmarksMenu(interact) } fun openHistory(interact: HistoryRobot.() -> Unit) = - openDeepLink("fenix://home_history").run { historyMenu(interact) } + openDeepLink("fenix://urls_history").run { historyMenu(interact) } fun openCollections(interact: HomeScreenRobot.() -> Unit) = openDeepLink("fenix://home_collections").run { homeScreen(interact) } diff --git a/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt b/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt index acce6276e..bb0395631 100644 --- a/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt +++ b/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt @@ -41,8 +41,8 @@ class DeepLinkIntentProcessor( val globalDirections = when (deepLink.host) { "home", "enable_private_browsing" -> GlobalDirections.Home - "home_bookmarks" -> GlobalDirections.Bookmarks - "home_history" -> GlobalDirections.History + "urls_bookmarks" -> GlobalDirections.Bookmarks + "urls_history" -> GlobalDirections.History "settings" -> GlobalDirections.Settings "turn_on_sync" -> GlobalDirections.Sync "settings_search_engine" -> GlobalDirections.SearchEngine diff --git a/app/src/test/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessorTest.kt b/app/src/test/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessorTest.kt index c80619204..10a1a3294 100644 --- a/app/src/test/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessorTest.kt +++ b/app/src/test/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessorTest.kt @@ -78,16 +78,16 @@ class DeepLinkIntentProcessorTest { } @Test - fun `process home_bookmarks deep link`() { - assertTrue(processor.process(testIntent("fenix://home_bookmarks"), navController, out)) + fun `process urls_bookmarks deep link`() { + assertTrue(processor.process(testIntent("fenix://urls_bookmarks"), navController, out)) verify { navController.navigate(NavGraphDirections.actionGlobalBookmarkFragment(BookmarkRoot.Root.id)) } verify { out wasNot Called } } @Test - fun `process home_history deep link`() { - assertTrue(processor.process(testIntent("fenix://home_history"), navController, out)) + fun `process urls_history deep link`() { + assertTrue(processor.process(testIntent("fenix://urls_history"), navController, out)) verify { navController.navigate(NavGraphDirections.actionGlobalHistoryFragment()) } verify { out wasNot Called } diff --git a/docs/mma.md b/docs/mma.md index 09a857d10..32166284b 100644 --- a/docs/mma.md +++ b/docs/mma.md @@ -255,11 +255,11 @@ Here is the list of current deep links available, which can be found here in the Opens to the Fenix home screen - `fenix://home_bookmarks` + `fenix://urls_bookmarks` Opens to the list of the user's bookmarks at its root - `fenix://home_history` + `fenix://urls_history` Opens to the list of pages the user has visited