diff --git a/src/Components/test/E2ETest/ServerExecutionTests/NavigationLockPrerenderingTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/NavigationLockPrerenderingTest.cs index 645a29cc7bfa..7b88e1d88745 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/NavigationLockPrerenderingTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/NavigationLockPrerenderingTest.cs @@ -24,9 +24,8 @@ public NavigationLockPrerenderingTest( public override Task InitializeAsync() => InitializeAsync(BrowserFixture.RoutingTestContext); - [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/57153")] - public void NavigationIsLockedAfterPrerendering() + [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/57153")] + public void ExternalNavigationIsLockedAfterPrerendering() { Navigate("/locked-navigation"); @@ -35,13 +34,24 @@ public void NavigationIsLockedAfterPrerendering() BeginInteractivity(); - // Assert that internal navigations are blocked - Browser.Click(By.Id("internal-navigation-link")); - Browser.Equal("Prevented navigations: 1", () => Browser.FindElement(By.Id("num-prevented-navigations")).Text); - // Assert that external navigations are blocked Browser.Navigate().GoToUrl("about:blank"); Browser.SwitchTo().Alert().Dismiss(); + Browser.Equal("Prevented navigations: 0", () => Browser.FindElement(By.Id("num-prevented-navigations")).Text); + } + + [Fact] + public void InternalNavigationIsLockedAfterPrerendering() + { + Navigate("/locked-navigation"); + + // Assert that the component rendered successfully + Browser.Equal("Prevented navigations: 0", () => Browser.FindElement(By.Id("num-prevented-navigations")).Text); + + BeginInteractivity(); + + // Assert that internal navigations are blocked + Browser.Click(By.Id("internal-navigation-link")); Browser.Equal("Prevented navigations: 1", () => Browser.FindElement(By.Id("num-prevented-navigations")).Text); } diff --git a/src/Components/test/E2ETest/Tests/RoutingTest.cs b/src/Components/test/E2ETest/Tests/RoutingTest.cs index 45ff979605d4..a094aa66f971 100644 --- a/src/Components/test/E2ETest/Tests/RoutingTest.cs +++ b/src/Components/test/E2ETest/Tests/RoutingTest.cs @@ -1155,8 +1155,7 @@ public void NavigationLock_HistoryNavigationWorks_AfterRefresh() Browser.Equal("1", () => app.FindElement(By.Id("location-changed-count"))?.Text); } - [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/57153")] + [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/57153")] public void NavigationLock_CanBlockExternalNavigation() { SetUrlViaPushState("/");