Changed home_* style links to urls_* to reflect that the destination is a set of links, rather than where the screen is
parent
1629878a66
commit
98a33ea82b
|
@ -24,8 +24,8 @@ import org.mozilla.fenix.ui.robots.DeepLinkRobot
|
||||||
* - fenix://settings_privacy — take the user to the privacy settings page.
|
* - 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://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_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://urls_history — take the user to the history list.
|
||||||
* - fenix://home_bookmarks — take the user to the bookmarks 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).
|
* - fenix://settings_logins — take the user to the settings page to do with logins (not the saved logins).
|
||||||
**/
|
**/
|
||||||
class DeepLinkTest {
|
class DeepLinkTest {
|
||||||
|
|
|
@ -45,10 +45,10 @@ class DeepLinkRobot {
|
||||||
openDeepLink("fenix://home").run { homeScreen(interact) }
|
openDeepLink("fenix://home").run { homeScreen(interact) }
|
||||||
|
|
||||||
fun openBookmarks(interact: BookmarksRobot.() -> Unit) =
|
fun openBookmarks(interact: BookmarksRobot.() -> Unit) =
|
||||||
openDeepLink("fenix://home_bookmarks").run { bookmarksMenu(interact) }
|
openDeepLink("fenix://urls_bookmarks").run { bookmarksMenu(interact) }
|
||||||
|
|
||||||
fun openHistory(interact: HistoryRobot.() -> Unit) =
|
fun openHistory(interact: HistoryRobot.() -> Unit) =
|
||||||
openDeepLink("fenix://home_history").run { historyMenu(interact) }
|
openDeepLink("fenix://urls_history").run { historyMenu(interact) }
|
||||||
|
|
||||||
fun openCollections(interact: HomeScreenRobot.() -> Unit) =
|
fun openCollections(interact: HomeScreenRobot.() -> Unit) =
|
||||||
openDeepLink("fenix://home_collections").run { homeScreen(interact) }
|
openDeepLink("fenix://home_collections").run { homeScreen(interact) }
|
||||||
|
|
|
@ -41,8 +41,8 @@ class DeepLinkIntentProcessor(
|
||||||
|
|
||||||
val globalDirections = when (deepLink.host) {
|
val globalDirections = when (deepLink.host) {
|
||||||
"home", "enable_private_browsing" -> GlobalDirections.Home
|
"home", "enable_private_browsing" -> GlobalDirections.Home
|
||||||
"home_bookmarks" -> GlobalDirections.Bookmarks
|
"urls_bookmarks" -> GlobalDirections.Bookmarks
|
||||||
"home_history" -> GlobalDirections.History
|
"urls_history" -> GlobalDirections.History
|
||||||
"settings" -> GlobalDirections.Settings
|
"settings" -> GlobalDirections.Settings
|
||||||
"turn_on_sync" -> GlobalDirections.Sync
|
"turn_on_sync" -> GlobalDirections.Sync
|
||||||
"settings_search_engine" -> GlobalDirections.SearchEngine
|
"settings_search_engine" -> GlobalDirections.SearchEngine
|
||||||
|
|
|
@ -78,16 +78,16 @@ class DeepLinkIntentProcessorTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `process home_bookmarks deep link`() {
|
fun `process urls_bookmarks deep link`() {
|
||||||
assertTrue(processor.process(testIntent("fenix://home_bookmarks"), navController, out))
|
assertTrue(processor.process(testIntent("fenix://urls_bookmarks"), navController, out))
|
||||||
|
|
||||||
verify { navController.navigate(NavGraphDirections.actionGlobalBookmarkFragment(BookmarkRoot.Root.id)) }
|
verify { navController.navigate(NavGraphDirections.actionGlobalBookmarkFragment(BookmarkRoot.Root.id)) }
|
||||||
verify { out wasNot Called }
|
verify { out wasNot Called }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `process home_history deep link`() {
|
fun `process urls_history deep link`() {
|
||||||
assertTrue(processor.process(testIntent("fenix://home_history"), navController, out))
|
assertTrue(processor.process(testIntent("fenix://urls_history"), navController, out))
|
||||||
|
|
||||||
verify { navController.navigate(NavGraphDirections.actionGlobalHistoryFragment()) }
|
verify { navController.navigate(NavGraphDirections.actionGlobalHistoryFragment()) }
|
||||||
verify { out wasNot Called }
|
verify { out wasNot Called }
|
||||||
|
|
|
@ -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>
|
<td>Opens to the Fenix home screen</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td>Opens to the list of the user's bookmarks at its root</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>`fenix://home_history`</td>
|
<td>`fenix://urls_history`</td>
|
||||||
<td>Opens to the list of pages the user has visited</td>
|
<td>Opens to the list of pages the user has visited</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue