@@ -472,19 +472,15 @@ public void IsAccordion_Ok()
472472 pb . Add ( a => a . IsReset , true ) ;
473473 } ) ;
474474
475- cut . InvokeAsync ( ( ) =>
476- {
477- var bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
478- bars [ 0 ] . Click ( ) ;
479- Assert . Contains ( "fa-rotate-90" , cut . Markup ) ;
480- } ) ;
475+ var bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
476+ bars [ 0 ] . Click ( ) ;
477+ cut . WaitForAssertion ( ( ) => Assert . Contains ( "fa-rotate-90" , cut . Markup ) ) ;
481478
482479 // 点击第二个节点箭头开展
483- cut . InvokeAsync ( ( ) =>
480+ bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
481+ bars [ bars . Count - 1 ] . Click ( ) ;
482+ cut . WaitForAssertion ( ( ) =>
484483 {
485- var bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
486- bars [ bars . Count - 1 ] . Click ( ) ;
487-
488484 bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
489485 Assert . DoesNotContain ( "fa-rotate-90" , bars [ 0 ] . ClassName ) ;
490486 Assert . Contains ( "fa-rotate-90" , bars [ 1 ] . ClassName ) ;
@@ -503,20 +499,17 @@ public void IsAccordion_Ok()
503499 nodes = TreeFoo . CascadingTree ( items ) . ToList ( ) ;
504500
505501 cut . SetParametersAndRender ( pb => pb . Add ( a => a . Items , nodes ) ) ;
506- cut . InvokeAsync ( ( ) =>
507- {
508- // 子节点
509- var bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content + .tree-ul > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
510- bars [ 0 ] . Click ( ) ;
511- } ) ;
512- Assert . Contains ( "fa-rotate-90" , cut . Markup ) ;
502+ // 子节点
503+ bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content + .tree-ul > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
504+ bars [ 0 ] . Click ( ) ;
505+ cut . WaitForAssertion ( ( ) => Assert . Contains ( "fa-rotate-90" , cut . Markup ) ) ;
513506
514- cut . InvokeAsync ( ( ) =>
515- {
516- // 点击第二个节点箭头开展
517- var bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content + .tree-ul > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
518- bars [ bars . Count - 1 ] . Click ( ) ;
507+ // 点击第二个节点箭头开展
508+ bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content + .tree-ul > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
509+ bars [ bars . Count - 1 ] . Click ( ) ;
519510
511+ cut . WaitForAssertion ( ( ) =>
512+ {
520513 bars = cut . FindAll ( ".tree-root > .tree-item > .tree-content + .tree-ul > .tree-item > .tree-content > .fa-caret-right.visible" ) ;
521514 Assert . DoesNotContain ( "fa-rotate-90" , bars [ 0 ] . ClassName ) ;
522515 Assert . Contains ( "fa-rotate-90" , bars [ 1 ] . ClassName ) ;
0 commit comments