File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,31 @@ public void IsActive_Ok()
204204 Assert . Contains ( "active" , nodes [ 1 ] . ClassName ) ;
205205 }
206206
207+ [ Fact ]
208+ public void ShowSearch_Ok ( )
209+ {
210+ var items = TreeFoo . GetTreeItems ( ) ;
211+ var cut = Context . RenderComponent < SelectTree < TreeFoo > > ( builder =>
212+ {
213+ builder . Add ( p => p . Items , items ) ;
214+ builder . Add ( p => p . Value , new TreeFoo ( ) { Id = "1020" , Text = "Navigation Two" } ) ;
215+ builder . Add ( p => p . ShowSearch , true ) ;
216+ } ) ;
217+ cut . Contains ( "tree-search" ) ;
218+
219+ cut . SetParametersAndRender ( pb =>
220+ {
221+ pb . Add ( a => a . ShowResetSearchButton , true ) ;
222+ } ) ;
223+ cut . Contains ( "tree-search-reset" ) ;
224+
225+ cut . SetParametersAndRender ( pb =>
226+ {
227+ pb . Add ( a => a . IsFixedSearch , true ) ;
228+ } ) ;
229+ cut . Contains ( "is-fixed-search" ) ;
230+ }
231+
207232 private List < TreeViewItem < string > > BindItems { get ; } =
208233 [
209234 new TreeViewItem < string > ( "Test1" )
You can’t perform that action at this time.
0 commit comments