File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
tests/MaterialDesignThemes.UITests/WPF Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -76,12 +76,14 @@ public async Task OnDatePicker_WithClearButton_ClearsSelectedUncommittedText()
7676 await datePickerTextBox . SendKeyboardInput ( $ "invalid date") ;
7777 await Assert . That ( await datePickerTextBox . GetText ( ) ) . IsEqualTo ( "invalid date" ) ;
7878
79- // Act
80- await clearButton . LeftClick ( ) ;
81- await Task . Delay ( 50 , TestContext . Current ! . CancellationToken ) ;
79+ // Act & Assert
80+ await Wait . For ( async ( ) => {
81+ await clearButton . LeftClick ( ) ;
82+ await Task . Delay ( 50 , TestContext . Current ! . CancellationToken ) ;
8283
83- // Assert
84- await Assert . That ( await datePickerTextBox . GetText ( ) ) . IsNull ( ) ;
84+ string ? text = await datePickerTextBox . GetText ( ) ;
85+ await Assert . That ( text ) . IsNull ( ) ;
86+ } ) ;
8587
8688 recorder . Success ( ) ;
8789 }
Original file line number Diff line number Diff line change @@ -93,15 +93,16 @@ public async Task SplitButton_WithButtonInPopup_CanBeInvoked()
9393 //NB: give the popup some time to show
9494 await Wait . For ( async ( ) => await popupContent . GetIsVisible ( ) ) ;
9595 await Wait . For ( async ( ) => await popupContent . GetActualHeight ( ) > 10 ) ;
96+
97+ await recorder . SaveScreenshot ( "PopupOpen" ) ;
98+
9699 await popupContent . LeftClick ( ) ;
97100 await Task . Delay ( 50 , TestContext . Current ! . CancellationToken ) ;
98101
99102 // Assert
100- await Wait . For ( async ( ) =>
101- {
102- var invocations = await clickEvent . GetInvocations ( ) ;
103- await Assert . That ( invocations ) . HasSingleItem ( ) ;
104- } ) ;
103+ var invocations = await clickEvent . GetInvocations ( ) ;
104+ await Assert . That ( invocations ) . HasSingleItem ( ) ;
105+
105106 recorder . Success ( ) ;
106107 }
107108
You can’t perform that action at this time.
0 commit comments