File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file 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 ToolbarTest : BootstrapBlazorTestBase
9+ {
10+ [ Fact ]
11+ public void Toolbar_Ok ( )
12+ {
13+ var cut = Context . RenderComponent < Toolbar > ( pb =>
14+ {
15+ pb . Add ( a => a . IsWrap , true ) ;
16+ pb . AddChildContent < ToolbarItem > ( pb =>
17+ {
18+ pb . AddChildContent < Button > ( ) ;
19+ } ) ;
20+ pb . AddChildContent < ToolbarSeparator > ( ) ;
21+ pb . AddChildContent < ToolbarButtonGroup > ( pb =>
22+ {
23+ pb . AddChildContent < Button > ( ) ;
24+ pb . AddChildContent < Button > ( ) ;
25+ } ) ;
26+ pb . AddChildContent < ToolbarSpace > ( ) ;
27+ } ) ;
28+
29+ // 检查 IsWrap 参数
30+ cut . Contains ( "flex-wrap: wrap;" ) ;
31+
32+ // 检查 Button 按钮
33+ cut . Contains ( "bb-toolbar-item" ) ;
34+
35+ // 检查 ButtonGroup
36+ cut . Contains ( "bb-toolbar-group btn-group" ) ;
37+
38+ // 检查 分隔符
39+ cut . Contains ( "bb-toolbar-vr vr" ) ;
40+
41+ // 检查 填充元素
42+ cut . Contains ( "bb-toolbar-space" ) ;
43+ }
44+ }
You can’t perform that action at this time.
0 commit comments