mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] Fixes https://github.com/mozilla-mobile/fenix/issues/4997: Changed navigation to ShareFragment
Changed test for new global navigation to share fragment.
This commit is contained in:
parent
0f119aae4e
commit
309495f15a
@ -23,6 +23,7 @@ import mozilla.components.feature.tabs.TabsUseCases
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.NavGraphDirections
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.browser.BrowserFragment
|
||||
import org.mozilla.fenix.browser.BrowserFragmentDirections
|
||||
@ -225,14 +226,12 @@ class DefaultBrowserToolbarControllerTest {
|
||||
val item = ToolbarMenu.Item.Share
|
||||
|
||||
every { currentSession.url } returns "https://mozilla.org"
|
||||
val directions = NavGraphDirections.actionGlobalShareFragment(currentSession.url)
|
||||
|
||||
controller.handleToolbarItemInteraction(item)
|
||||
|
||||
verify { metrics.track(Event.BrowserMenuItemTapped(Event.BrowserMenuItemTapped.Item.SHARE)) }
|
||||
verify {
|
||||
val directions = BrowserFragmentDirections.actionBrowserFragmentToShareFragment(currentSession.url)
|
||||
navController.nav(R.id.browserFragment, directions)
|
||||
}
|
||||
verify { navController.navigate(directions) }
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user