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 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 AffixTest : BootstrapBlazorTestBase
9+ {
10+ [ Fact ]
11+ public void Position_Ok ( )
12+ {
13+ var cut = Context . RenderComponent < Affix > ( pb =>
14+ {
15+ pb . Add ( a => a . Offset , 100 ) ;
16+ pb . Add ( a => a . ZIndex , 10 ) ;
17+ pb . Add ( a => a . Position , AffixPosition . Bottom ) ;
18+ pb . Add ( a => a . ChildContent , pb => pb . AddMarkupContent ( 0 , "<button>Test</button>" ) ) ;
19+ } ) ;
20+ Assert . Contains ( "bb-affix" , cut . Markup ) ;
21+ Assert . Contains ( "position: sticky;" , cut . Markup ) ;
22+ Assert . Contains ( "z-index: 10;" , cut . Markup ) ;
23+ Assert . Contains ( "bottom: 100px;" , cut . Markup ) ;
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments