File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,29 @@ namespace UnitTest.Components;
1313
1414public class SelectGenericTest : BootstrapBlazorTestBase
1515{
16+
17+ [ Fact ]
18+ public void ScrollIntoViewBehavior_Ok ( )
19+ {
20+ var cut = Context . RenderComponent < SelectGeneric < string > > ( pb =>
21+ {
22+ pb . Add ( a => a . Items , new List < SelectedItem < string > > ( )
23+ {
24+ new ( "1" , "Test1" ) ,
25+ new ( "2" , "Test2" )
26+ } ) ;
27+ pb . Add ( a => a . Value , "2" ) ;
28+ pb . Add ( a => a . ScrollIntoViewBehavior , ScrollIntoViewBehavior . Auto ) ;
29+ } ) ;
30+ Assert . Contains ( "data-bb-scroll-behavior=\" auto\" " , cut . Markup ) ;
31+
32+ cut . SetParametersAndRender ( pb =>
33+ {
34+ pb . Add ( a => a . ScrollIntoViewBehavior , ScrollIntoViewBehavior . Smooth ) ;
35+ } ) ;
36+ Assert . DoesNotContain ( "data-bb-scroll-behavior" , cut . Markup ) ;
37+ }
38+
1639 [ Fact ]
1740 public async Task OnSearchTextChanged_Null ( )
1841 {
You can’t perform that action at this time.
0 commit comments