@@ -544,28 +544,21 @@ public async Task Navigation_FromRootNavigationPageUsingRoute()
544544 }
545545
546546 [ Fact ]
547- public async Task Navigation_FromIntermediatePageUsingRoute ( )
547+ public async Task Navigation_FromFlyoutPageUsingRoute ( )
548548 {
549549 var mauiApp = CreateBuilder ( prism => prism . CreateWindow ( "MockHome/NavigationPage/MockViewA" ) )
550550 . Build ( ) ;
551551 var window = GetWindow ( mauiApp ) ;
552552
553- var mockHome = ( MockHome ) window . Page ;
554- var pageNavigatingFrom = ( NavigationPage ) mockHome . Detail ;
555- Assert . IsType < MockViewA > ( pageNavigatingFrom . CurrentPage ) ;
553+ var mockHome = ( FlyoutPage ) window . Page ;
554+ var navigationPage = ( NavigationPage ) mockHome . Detail ;
555+ Assert . IsType < MockViewA > ( navigationPage . CurrentPage ) ;
556556
557- var result = await pageNavigatingFrom . CurrentPage . GetContainerProvider ( )
558- . Resolve < INavigationService > ( )
559- . NavigateFromAsync ( "NavigationPage" , UriParsingHelper . Parse ( "MockViewB" ) , null ) ;
557+ var navigationService = Prism . Navigation . Xaml . Navigation . GetNavigationService ( window . CurrentPage ) ;
558+ var result = await navigationService . NavigateFromAsync ( "MockHome" , UriParsingHelper . Parse ( "MockViewB" ) , null ) ;
560559
561560 Assert . True ( result . Success ) ;
562-
563- // NavigationPage has not been replaced.
564- var pageNavigatedFrom = ( NavigationPage ) mockHome . Detail ;
565- Assert . Equal ( pageNavigatingFrom , pageNavigatedFrom ) ;
566-
567- // Navigation should be succeeded.
568- Assert . IsType < MockViewB > ( pageNavigatedFrom . CurrentPage ) ;
561+ Assert . IsType < MockViewB > ( mockHome . Detail ) ;
569562 }
570563
571564 [ Theory ]
0 commit comments