File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the Apache 2.0 License
3+ // See the LICENSE file in the project root for more information.
4+ // Maintainer: Argo Zhang([email protected] ) Website: https://www.blazor.zone 5+
6+ namespace UnitTest . Components ;
7+
8+ public class LayoutSplitebarTest : BootstrapBlazorTestBase
9+ {
10+ [ Fact ]
11+ public void LayoutSplitebar_Ok ( )
12+ {
13+ var cut = Context . RenderComponent < LayoutSplitebar > ( pb =>
14+ {
15+ pb . Add ( a => a . ContainerSelector , ".layout" ) ;
16+ } ) ;
17+ cut . Contains ( "data-bb-selector=\" .layout\" " ) ;
18+
19+ cut . SetParametersAndRender ( pb =>
20+ {
21+ pb . Add ( a => a . Min , 100 ) ;
22+ pb . Add ( a => a . Max , 200 ) ;
23+ } ) ;
24+ cut . Contains ( "data-bb-min=\" 100\" " ) ;
25+ cut . Contains ( "data-bb-max=\" 200\" " ) ;
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -237,6 +237,23 @@ public void UseTabSet_Layout()
237237 cut . WaitForAssertion ( ( ) => cut . Contains ( "<div class=\" tabs-body-content\" >Binder</div>" ) ) ;
238238 }
239239
240+ [ Fact ]
241+ public void ShowLayouSidebar_Ok ( )
242+ {
243+ var cut = Context . RenderComponent < Layout > ( pb =>
244+ {
245+ pb . Add ( a => a . UseTabSet , true ) ;
246+ pb . Add ( a => a . AdditionalAssemblies , new Assembly [ ] { GetType ( ) . Assembly } ) ;
247+ pb . Add ( a => a . IsFullSide , true ) ;
248+ pb . Add ( a => a . ShowSplitBar , true ) ;
249+ pb . Add ( a => a . Side , new RenderFragment ( builder =>
250+ {
251+ builder . AddContent ( 0 , "test" ) ;
252+ } ) ) ;
253+ } ) ;
254+ cut . Contains ( "layout-splitebar" ) ;
255+ }
256+
240257 [ Fact ]
241258 public void UseTabSet_Menus ( )
242259 {
You can’t perform that action at this time.
0 commit comments