@@ -507,7 +507,6 @@ public async Task GetParentsState_Ok()
507507 Assert . Equal ( CheckboxState . Checked , checkboxes [ 1 ] . Instance . State ) ;
508508
509509 await cut . InvokeAsync ( ( ) => cut . Find ( ".fa-caret-right.visible" ) . Click ( ) ) ;
510-
511510 cut . WaitForState ( ( ) => cut . Instance . Items [ 0 ] . Items . Count > 0 ) ;
512511 // 101 unchecked
513512 // -> 101-101 unchecked
@@ -516,21 +515,11 @@ public async Task GetParentsState_Ok()
516515
517516 checkboxes = cut . FindComponents < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
518517 var parents = new List < int > ( ) { 0 } ;
519- List < CheckboxState > results = await cut . Instance . GetParentsState ( parents , 1 , CheckboxState . Checked ) ;
520- Assert . NotNull ( results ) ;
521- Assert . Equal ( CheckboxState . Checked , checkboxes [ 1 ] . Instance . Value . CheckedState ) ;
522- Assert . Equal ( CheckboxState . Checked , checkboxes [ 0 ] . Instance . Value . CheckedState ) ;
523-
524- Assert . Single ( results ) ;
525- Assert . Equal ( CheckboxState . Checked , results [ 0 ] ) ;
526-
527- // 更改第二个子节点状态
528- checkboxes = cut . FindComponents < Checkbox < TreeViewItem < TreeFoo > > > ( ) ;
529- results = await cut . Instance . GetParentsState ( parents , 2 , CheckboxState . UnChecked ) ;
518+ List < CheckboxState > results = await cut . Instance . GetParentsState ( parents ) ;
530519 Assert . NotNull ( results ) ;
531520 Assert . Equal ( CheckboxState . Indeterminate , checkboxes [ 0 ] . Instance . Value . CheckedState ) ;
532- Assert . Equal ( CheckboxState . Checked , checkboxes [ 1 ] . Instance . Value . CheckedState ) ;
533- Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 2 ] . Instance . Value . CheckedState ) ;
521+ Assert . Equal ( CheckboxState . UnChecked , checkboxes [ 1 ] . Instance . Value . CheckedState ) ;
522+ Assert . Equal ( CheckboxState . Checked , checkboxes [ 2 ] . Instance . Value . CheckedState ) ;
534523
535524 Assert . Single ( results ) ;
536525 Assert . Equal ( CheckboxState . Indeterminate , results [ 0 ] ) ;
0 commit comments