From 309495f15ab098d9ba38c96094d151bdd9428f22 Mon Sep 17 00:00:00 2001 From: mihai-adrian Date: Fri, 30 Aug 2019 11:24:28 +0300 Subject: [PATCH] [fenix] Fixes https://github.com/mozilla-mobile/fenix/issues/4997: Changed navigation to ShareFragment Changed test for new global navigation to share fragment. --- .../toolbar/DefaultBrowserToolbarControllerTest.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/test/java/org/mozilla/fenix/components/toolbar/DefaultBrowserToolbarControllerTest.kt b/app/src/test/java/org/mozilla/fenix/components/toolbar/DefaultBrowserToolbarControllerTest.kt index 956b96d452..bcbace901c 100644 --- a/app/src/test/java/org/mozilla/fenix/components/toolbar/DefaultBrowserToolbarControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/components/toolbar/DefaultBrowserToolbarControllerTest.kt @@ -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