File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/test/integration/UIIntegrationTests Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -545,8 +545,21 @@ await RunTestAsync(async (form, listView) =>
545
545
Assert . False ( item . Selected ) ;
546
546
}
547
547
548
+ await form . InvokeAsync ( ( ) =>
549
+ {
550
+ listView . Update ( ) ;
551
+ listView . Refresh ( ) ;
552
+ Application . DoEvents ( ) ;
553
+ } ) ;
554
+
555
+ Assert . True ( listView . Items . Count > 0 ,
556
+ $ "Expected ListView to contain at least one item, but found { listView . Items . Count } .") ;
557
+ Assert . True ( listView . Items [ 0 ] . SubItems . Count > 1 ,
558
+ $ "Expected first item to have more than one subitem, but found { listView . Items [ 0 ] . SubItems . Count } .") ;
559
+
548
560
Point listViewCenter = GetCenter ( listView . RectangleToScreen ( listView . Items [ 0 ] . SubItems [ 1 ] . Bounds ) ) ;
549
561
await MoveMouseAsync ( form , listViewCenter ) ;
562
+
550
563
await InputSimulator . SendAsync (
551
564
form ,
552
565
inputSimulator => inputSimulator . Keyboard . KeyDown ( VIRTUAL_KEY . VK_SHIFT )
@@ -557,7 +570,7 @@ await InputSimulator.SendAsync(
557
570
form ,
558
571
inputSimulator => inputSimulator . Mouse . LeftButtonClick ( )
559
572
. Keyboard . KeyUp ( VIRTUAL_KEY . VK_SHIFT ) ) ;
560
- await form . InvokeAsync ( ( ) => { } ) ;
573
+
561
574
foreach ( ListViewItem item in listView . Items )
562
575
{
563
576
Assert . Equal ( 0 , item . StateImageIndex ) ;
You can’t perform that action at this time.
0 commit comments