Skip to content

Commit 232aa5a

Browse files
authored
Fix UI test to be less brittle (#3299)
1 parent e0c26e1 commit 232aa5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MaterialDesignThemes.UITests/WPF/ListBoxes/ListBoxTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public async Task OnToggle_ShouldGrabFocus()
168168
var listBoxItem = await listBox.GetElement<ListBoxItem>("/ListBoxItem[2]");
169169

170170
await textBox.LeftClick();
171-
Assert.True(await textBox.GetIsKeyboardFocusWithin());
171+
await Wait.For(async () => Assert.True(await textBox.GetIsKeyboardFocusWithin()));
172172

173173
// Act
174174
await listBoxItem.LeftClick();

0 commit comments

Comments
 (0)