File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
WebAssembly/testassets/HostedInAspNet.Server Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 33
44namespace HostedInAspNet . Server ;
55
6+ using System ;
7+ using Microsoft . AspNetCore . Components ;
8+
69public class Startup
710{
811 public Startup ( IConfiguration configuration )
@@ -16,6 +19,14 @@ public Startup(IConfiguration configuration)
1619 // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
1720 public void ConfigureServices ( IServiceCollection services )
1821 {
22+ var mapAlternativePathApp = Configuration . GetValue < bool > ( "UseAlternativeBasePath" ) ;
23+ if ( mapAlternativePathApp )
24+ {
25+ services . Configure < NavigationManagerOptions > ( options =>
26+ {
27+ options . PathBaseComparison = StringComparison . OrdinalIgnoreCase ;
28+ } ) ;
29+ }
1930 services . AddSingleton < BootResourceRequestLog > ( ) ;
2031 }
2132
Original file line number Diff line number Diff line change 55using Microsoft . AspNetCore . Components . E2ETest . Infrastructure . ServerFixtures ;
66using Microsoft . AspNetCore . E2ETesting ;
77using OpenQA . Selenium ;
8+ using Xunit ;
89using Xunit . Abstractions ;
910
1011namespace Microsoft . AspNetCore . Components . E2ETest . Tests ;
@@ -22,15 +23,14 @@ public HostedInAlternativeBasePathTest(
2223 serverFixture . Environment = AspNetEnvironment . Development ;
2324 }
2425
25- protected override void InitializeAsyncCore ( )
26+ [ Theory ]
27+ [ InlineData ( "/app/" ) ]
28+ [ InlineData ( "/APP/" ) ]
29+ public void CanLoadBlazorAppFromSubPath ( string path )
2630 {
27- Navigate ( "/app/" ) ;
31+ Navigate ( path ) ;
2832 WaitUntilLoaded ( ) ;
29- }
3033
31- [ Fact ]
32- public void CanLoadBlazorAppFromSubPath ( )
33- {
3434 Assert . Equal ( "App loaded on custom path" , Browser . Title ) ;
3535 Assert . Empty ( Browser . GetBrowserLogs ( LogLevel . Severe ) ) ;
3636 }
You can’t perform that action at this time.
0 commit comments