File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Endpoints/src/DependencyInjection
test/E2ETest/ServerRenderingTests Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ namespace Microsoft.AspNetCore.Components.Endpoints;
77
88internal sealed class HttpNavigationManager : NavigationManager , IHostEnvironmentNavigationManager
99{
10- private const string EnableThrowNavigatioExceptionSwitchKey = "Microsoft.AspNetCore.Components.Endpoints.EnableThrowNavigatioException " ;
11- private static readonly bool _throwNavigationException = AppContext . TryGetSwitch ( EnableThrowNavigatioExceptionSwitchKey , out var switchValue ) && switchValue ;
10+ private const string EnableThrowNavigationException = "Microsoft.AspNetCore.Components.Endpoints.EnableThrowNavigationException " ;
11+ private static readonly bool _throwNavigationException = AppContext . TryGetSwitch ( EnableThrowNavigationException , out var switchValue ) && switchValue ;
1212
1313 private EventHandler < NavigationEventArgs > ? _onNavigateTo ;
1414 public event EventHandler < NavigationEventArgs > OnNavigateTo
Original file line number Diff line number Diff line change @@ -65,9 +65,12 @@ public void CanUseServerAuthenticationStateByDefault()
6565 Browser . Equal ( "True" , ( ) => Browser . FindElement ( By . Id ( "is-in-test-role-2" ) ) . Text ) ;
6666 }
6767
68- [ Fact ]
69- public void NavigatesWithoutInteractivityByRequestRedirection ( )
68+ [ Theory ]
69+ [ InlineData ( true ) ]
70+ [ InlineData ( false ) ]
71+ public void NavigatesWithoutInteractivityByRequestRedirection ( bool controlFlowByException )
7072 {
73+ AppContext . SetSwitch ( "Microsoft.AspNetCore.Components.Endpoints.EnableThrowNavigationException" , isEnabled : controlFlowByException ) ;
7174 Navigate ( $ "{ ServerPathBase } /routing/ssr-navigate-to") ;
7275 Browser . Equal ( "Click submit to navigate to home" , ( ) => Browser . Exists ( By . Id ( "test-info" ) ) . Text ) ;
7376 Browser . Click ( By . Id ( "redirectButton" ) ) ;
You can’t perform that action at this time.
0 commit comments