File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
tests/MaterialDesignThemes.UITests/WPF/DialogHosts Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 44
55using static MaterialDesignThemes . UITests . MaterialDesignSpec ;
66
7-
87namespace MaterialDesignThemes . UITests . WPF . DialogHosts ;
98
109public class DialogHostTests : TestBase
@@ -556,20 +555,16 @@ public async Task DialogHost_TrapsFocusInsidePopup_WhenTabbing(string dialogHost
556555
557556 await openDialogButton . LeftClick ( ) ;
558557
559- await Task . Delay ( 400 , TestContext . Current ! . CancellationToken ) ;
560-
561558 // By default the first focusable element should be focused
562- await Assert . That ( await textBoxOne . GetIsFocused ( ) ) . IsTrue ( ) ;
559+ await Wait . For ( async ( ) => await Assert . That ( await textBoxOne . GetIsFocused ( ) ) . IsTrue ( ) ) ;
563560
564561 await textBoxOne . SendInput ( new KeyboardInput ( inputActions ) ) ;
565- await Task . Delay ( 100 , TestContext . Current ! . CancellationToken ) ;
566-
567- await Assert . That ( await textBoxTwo . GetIsFocused ( ) ) . IsTrue ( ) ;
562+
563+ await Wait . For ( async ( ) => await Assert . That ( await textBoxTwo . GetIsFocused ( ) ) . IsTrue ( ) ) ;
568564
569565 await textBoxTwo . SendInput ( new KeyboardInput ( inputActions ) ) ;
570- await Task . Delay ( 100 , TestContext . Current ! . CancellationToken ) ;
571566
572- await Assert . That ( await textBoxOne . GetIsFocused ( ) ) . IsTrue ( ) ;
567+ await Wait . For ( async ( ) => await Assert . That ( await textBoxOne . GetIsFocused ( ) ) . IsTrue ( ) ) ;
573568
574569 recorder . Success ( ) ;
575570
You can’t perform that action at this time.
0 commit comments