Skip to content

Commit 70a4bf7

Browse files
E2E test async robustness tweaks following recent failures
1 parent 7d92c07 commit 70a4bf7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/BindTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ public void CanBindCheckbox_InitiallyUnchecked()
115115
// Modify target; verify value is updated
116116
target.Click();
117117
WaitAssert.True(() => target.Selected);
118-
Assert.Equal("True", boundValue.Text);
118+
WaitAssert.Equal("True", () => boundValue.Text);
119119

120120
// Modify data; verify checkbox is updated
121121
invertButton.Click();
122122
WaitAssert.False(() => target.Selected);
123-
Assert.Equal("False", boundValue.Text);
123+
WaitAssert.Equal("False", () => boundValue.Text);
124124
}
125125

126126
[Fact]
@@ -135,12 +135,12 @@ public void CanBindCheckbox_InitiallyChecked()
135135
// Modify target; verify value is updated
136136
target.Click();
137137
WaitAssert.False(() => target.Selected);
138-
Assert.Equal("False", boundValue.Text);
138+
WaitAssert.Equal("False", () => boundValue.Text);
139139

140140
// Modify data; verify checkbox is updated
141141
invertButton.Click();
142142
WaitAssert.True(() => target.Selected);
143-
Assert.Equal("True", boundValue.Text);
143+
WaitAssert.Equal("True", () => boundValue.Text);
144144
}
145145

146146
[Fact]

test/Microsoft.AspNetCore.Blazor.E2ETest/Tests/ComponentRenderingTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public void CanRenderSvgChildComponentWithCorrectNamespace()
328328
public void LogicalElementInsertionWorksHierarchically()
329329
{
330330
var appElement = MountTestComponent<LogicalElementInsertionCases>();
331-
Assert.Equal("First Second Third", appElement.Text);
331+
WaitAssert.Equal("First Second Third", () => appElement.Text);
332332
}
333333

334334
[Fact]

0 commit comments

Comments
 (0)