diff --git a/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/RoutingTest.cs b/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/RoutingTest.cs index 66a4bb1fd0..8970de915c 100644 --- a/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/RoutingTest.cs +++ b/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/RoutingTest.cs @@ -50,6 +50,16 @@ namespace Microsoft.AspNetCore.Blazor.E2ETest.Tests Assert.Equal("This is another page.", app.FindElement(By.Id("test-info")).Text); } + [Fact] + public void CanFollowLinkToOtherPageWithBaseRelativeUrl() + { + SetUrlViaPushState($"{ServerPathBase}/RouterTest/"); + + var app = MountTestComponent(); + app.FindElement(By.LinkText("Other with base-relative URL")).Click(); + Assert.Equal("This is another page.", app.FindElement(By.Id("test-info")).Text); + } + [Fact] public void CanFollowLinkToDefaultPage() { diff --git a/test/testapps/BasicTestApp/RouterTest/Links.cshtml b/test/testapps/BasicTestApp/RouterTest/Links.cshtml index 70efead6a4..e7bbca5d12 100644 --- a/test/testapps/BasicTestApp/RouterTest/Links.cshtml +++ b/test/testapps/BasicTestApp/RouterTest/Links.cshtml @@ -3,6 +3,7 @@
  • Default with query
  • Default with hash
  • Other
  • +
  • Other with base-relative URL
  • Other with query
  • Other with hash