From 32257ad9a2f34bfa310d7783fbe6ff819cc78233 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Fri, 5 Sep 2025 17:48:35 +0200 Subject: [PATCH 1/3] Make the flaky test wait for the conditon to be true. --- .../FormWithParentBindingContextTest.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs b/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs index b8171c827e41..3b27216b5042 100644 --- a/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs +++ b/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs @@ -1344,19 +1344,19 @@ public void RadioButtonGetsResetAfterSubmittingEnhancedForm() { GoTo("forms/form-with-checkbox-and-radio-button"); - Assert.False(Browser.Exists(By.Id("checkbox")).Selected); - Assert.False(Browser.Exists(By.Id("radio-button")).Selected); + WaitAssert.False(Browser, () => Browser.Exists(By.Id("checkbox")).Selected); + WaitAssert.False(Browser, () => Browser.Exists(By.Id("radio-button")).Selected); Browser.Exists(By.Id("checkbox")).Click(); Browser.Exists(By.Id("radio-button")).Click(); - Assert.True(Browser.Exists(By.Id("checkbox")).Selected); - Assert.True(Browser.Exists(By.Id("radio-button")).Selected); + WaitAssert.True(Browser, () => Browser.Exists(By.Id("checkbox")).Selected); + WaitAssert.True(Browser, () => Browser.Exists(By.Id("radio-button")).Selected); Browser.Exists(By.Id("submit-button")).Click(); - Assert.False(Browser.Exists(By.Id("checkbox")).Selected); - Assert.False(Browser.Exists(By.Id("radio-button")).Selected); + WaitAssert.False(Browser, () => Browser.Exists(By.Id("checkbox")).Selected); + WaitAssert.False(Browser, () => Browser.Exists(By.Id("radio-button")).Selected); } [Fact] From a4f58755e893d17c541077aa4f93ff9f8290620c Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Mon, 8 Sep 2025 09:48:33 +0200 Subject: [PATCH 2/3] Improve `NavigationManagerUriGetsUpdatedOnEnhancedNavigation_BothServerAndWebAssembly` --- .../EnhancedNavigationTest.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs b/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs index 158cc2d42c8d..8f47410c5fb1 100644 --- a/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs +++ b/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs @@ -526,13 +526,21 @@ public void NavigationManagerUriGetsUpdatedOnEnhancedNavigation_BothServerAndWeb Browser.Exists(By.TagName("nav")).FindElement(By.LinkText("LocationChanged/LocationChanging event (server-and-wasm)")).Click(); Browser.Equal("Page with location changed components", () => Browser.Exists(By.TagName("h1")).Text); - Assert.EndsWith("/nav/location-changed/server-and-wasm", Browser.Exists(By.Id("nav-uri-server")).Text); - Assert.EndsWith("/nav/location-changed/server-and-wasm", Browser.Exists(By.Id("nav-uri-wasm")).Text); + Browser.True(() => Browser.Exists(By.Id("nav-uri-server")).Text.EndsWith( + "/nav/location-changed/server-and-wasm", + StringComparison.Ordinal)); + Browser.True(() => Browser.Exists(By.Id("nav-uri-wasm")).Text.EndsWith( + "/nav/location-changed/server-and-wasm", + StringComparison.Ordinal)); Browser.Exists(By.Id($"update-query-string-{runtimeThatInvokedNavigation}")).Click(); - Assert.EndsWith($"/nav/location-changed/server-and-wasm?query=1", Browser.Exists(By.Id($"nav-uri-server")).Text); - Assert.EndsWith($"/nav/location-changed/server-and-wasm?query=1", Browser.Exists(By.Id($"nav-uri-wasm")).Text); + Browser.True(() => Browser.Exists(By.Id("nav-uri-server")).Text.EndsWith( + "/nav/location-changed/server-and-wasm?query=1", + StringComparison.Ordinal)); + Browser.True(() => Browser.Exists(By.Id("nav-uri-wasm")).Text.EndsWith( + "/nav/location-changed/server-and-wasm?query=1", + StringComparison.Ordinal)); } [Theory] From 64911af0bb7c6a148d1cf5e5558fcfb0f2b8b462 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Mon, 8 Sep 2025 12:47:13 +0200 Subject: [PATCH 3/3] Add quarantine to the failing test. --- src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs b/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs index c3173eb7b178..d60dadfb19fb 100644 --- a/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs +++ b/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs @@ -184,6 +184,7 @@ public async Task HubConnectionCanSendAndReceiveGroupMessagesGroupNameWithPatter [ConditionalTheory] [SkipIfDockerNotPresent] [MemberData(nameof(TransportTypesAndProtocolTypes))] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/63582")] public async Task CanSendAndReceiveUserMessagesUserNameWithPatternIsTreatedAsLiteral(HttpTransportType transportType, string protocolName) { using (StartVerifiableLog())