File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang([email protected] ) Website: https://www.blazor.zone 55
6+ using Microsoft . AspNetCore . Components . Rendering ;
7+
68namespace UnitTest . Services ;
79
810/// <summary>
@@ -92,6 +94,10 @@ public async Task Show_Component()
9294 } ) ;
9395 var button = cut . Find ( "button" ) ;
9496 await cut . InvokeAsync ( ( ) => button . Click ( ) ) ;
97+
98+ // close
99+ var close = cut . Find ( ".btn-mask-close" ) ;
100+ await cut . InvokeAsync ( ( ) => close . Click ( ) ) ;
95101 }
96102
97103 [ Fact ]
@@ -114,6 +120,11 @@ public async Task Show_Type()
114120
115121 class MockComponent : ComponentBase
116122 {
117-
123+ protected override void BuildRenderTree ( RenderTreeBuilder builder )
124+ {
125+ builder . OpenComponent < DialogCloseButton > ( 0 ) ;
126+ builder . AddAttribute ( 1 , "class" , "btn-mask-close" ) ;
127+ builder . CloseComponent ( ) ;
128+ }
118129 }
119130}
You can’t perform that action at this time.
0 commit comments