File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ public async Task OnSelectedItemChanged_Ok()
212212 } ) ;
213213
214214 var item = cut . Find ( ".dropdown-item" ) ;
215- await cut . InvokeAsync ( ( ) => item . Click ( ) ) ;
215+ await cut . InvokeAsync ( ( ) => cut . Instance . TriggerClick ( 0 ) ) ;
216216 Assert . Equal ( "test1" , selectedItem ) ;
217217 }
218218
@@ -268,8 +268,11 @@ public async Task OnBlurAsync_Ok()
268268 await cut . InvokeAsync ( ( ) => cut . Instance . TriggerBlur ( ) ) ;
269269 Assert . Equal ( "test2" , val ) ;
270270
271- var item = cut . Find ( ".dropdown-item" ) ;
272- await cut . InvokeAsync ( ( ) => item . Click ( ) ) ;
271+ await cut . InvokeAsync ( ( ) => cut . Instance . TriggerClick ( 0 ) ) ;
272+ Assert . Equal ( "test2" , val ) ;
273+
274+ await cut . InvokeAsync ( ( ) => cut . Instance . TriggerClick ( - 1 ) ) ;
275+ await cut . InvokeAsync ( ( ) => cut . Instance . TriggerClick ( 10 ) ) ;
273276 }
274277
275278 [ Fact ]
You can’t perform that action at this time.
0 commit comments