2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

Changed home_* style links to urls_* to reflect that the destination is a set of links, rather than where the screen is

This commit is contained in:
James Hugman 2020-07-10 13:51:11 +01:00 committed by Emily Kager
parent 1629878a66
commit 98a33ea82b
5 changed files with 12 additions and 12 deletions

View File

@ -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 {

View File

@ -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) }

View File

@ -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

View File

@ -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 }

View File

@ -255,11 +255,11 @@ Here is the list of current deep links available, which can be found here in the
<td>Opens to the Fenix home screen</td>
</tr>
<tr>
<td>`fenix://home_bookmarks`</td>
<td>`fenix://urls_bookmarks`</td>
<td>Opens to the list of the user's bookmarks at its root</td>
</tr>
<tr>
<td>`fenix://home_history`</td>
<td>`fenix://urls_history`</td>
<td>Opens to the list of pages the user has visited</td>
</tr>
<tr>