File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -668,7 +668,7 @@ public void IsMarkupString_Ok()
668668 }
669669
670670 [ Fact ]
671- public void IsVirtualize_Items ( )
671+ public void DefaultVirtualizeItemText_Ok ( )
672672 {
673673 var cut = Context . RenderComponent < MultiSelect < string > > ( pb =>
674674 {
@@ -677,19 +677,14 @@ public void IsVirtualize_Items()
677677 new ( "1" , "Test1" ) ,
678678 new ( "2" , "Test2" )
679679 } ) ;
680- pb . Add ( a => a . Value , "2" ) ;
680+ pb . Add ( a => a . Value , "1,2" ) ;
681+ pb . Add ( a => a . DefaultVirtualizeItemText , "Test1" ) ;
681682 pb . Add ( a => a . IsVirtualize , true ) ;
682- pb . Add ( a => a . RowHeight , 33f ) ;
683- pb . Add ( a => a . OverscanCount , 4 ) ;
684- } ) ;
685-
686- cut . SetParametersAndRender ( pb => pb . Add ( a => a . ShowSearch , true ) ) ;
687- cut . InvokeAsync ( async ( ) =>
688- {
689- // 搜索 T
690- cut . Find ( ".search-text" ) . Input ( "T" ) ;
691- await cut . Instance . ConfirmSelectedItem ( 0 ) ;
692683 } ) ;
684+ var items = cut . FindAll ( ".multi-select-items .multi-select-item" ) ;
685+ Assert . Equal ( 2 , items . Count ) ;
686+ Assert . Equal ( "Test1" , items [ 0 ] . InnerHtml ) ;
687+ Assert . Equal ( "2" , items [ 1 ] . InnerHtml ) ;
693688 }
694689
695690 [ Fact ]
You can’t perform that action at this time.
0 commit comments