From 70a4bf7521965723b54750d0ed5e8af96ce5b465 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 9 Aug 2018 10:27:40 +0100 Subject: [PATCH] E2E test async robustness tweaks following recent failures --- .../Microsoft.AspNetCore.Blazor.E2ETest/Tests/BindTest.cs | 8 ++++---- .../Tests/ComponentRenderingTest.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/BindTest.cs b/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/BindTest.cs index fadf0b37aa..afd949fbec 100644 --- a/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/BindTest.cs +++ b/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/BindTest.cs @@ -115,12 +115,12 @@ namespace Microsoft.AspNetCore.Blazor.E2ETest.Tests // Modify target; verify value is updated target.Click(); WaitAssert.True(() => target.Selected); - Assert.Equal("True", boundValue.Text); + WaitAssert.Equal("True", () => boundValue.Text); // Modify data; verify checkbox is updated invertButton.Click(); WaitAssert.False(() => target.Selected); - Assert.Equal("False", boundValue.Text); + WaitAssert.Equal("False", () => boundValue.Text); } [Fact] @@ -135,12 +135,12 @@ namespace Microsoft.AspNetCore.Blazor.E2ETest.Tests // Modify target; verify value is updated target.Click(); WaitAssert.False(() => target.Selected); - Assert.Equal("False", boundValue.Text); + WaitAssert.Equal("False", () => boundValue.Text); // Modify data; verify checkbox is updated invertButton.Click(); WaitAssert.True(() => target.Selected); - Assert.Equal("True", boundValue.Text); + WaitAssert.Equal("True", () => boundValue.Text); } [Fact] diff --git a/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/ComponentRenderingTest.cs b/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/ComponentRenderingTest.cs index 9c8312f04e..e12703da7c 100644 --- a/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/ComponentRenderingTest.cs +++ b/test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/ComponentRenderingTest.cs @@ -328,7 +328,7 @@ namespace Microsoft.AspNetCore.Blazor.E2ETest.Tests public void LogicalElementInsertionWorksHierarchically() { var appElement = MountTestComponent(); - Assert.Equal("First Second Third", appElement.Text); + WaitAssert.Equal("First Second Third", () => appElement.Text); } [Fact]