File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -247,4 +247,31 @@ private static void TriggerTouchStart(IElement row)
247247 ]
248248 } ) ;
249249 }
250+
251+ [ Fact ]
252+ public void ContextMenuDivider_Ok ( )
253+ {
254+ var cut = Context . RenderComponent < ContextMenuZone > ( pb =>
255+ {
256+ pb . AddChildContent < ContextMenu > ( pb =>
257+ {
258+ pb . AddChildContent < ContextMenuItem > ( builder =>
259+ {
260+ builder . Add ( a => a . Text , "Item1" ) ;
261+ } ) ;
262+ pb . AddChildContent < ContextMenuDivider > ( ) ;
263+ pb . AddChildContent < ContextMenuItem > ( builder =>
264+ {
265+ builder . Add ( a => a . Text , "Item2" ) ;
266+ } ) ;
267+ } ) ;
268+ } ) ;
269+
270+ var menu = cut . Find ( ".dropdown-menu" ) ;
271+ var children = menu . Children ;
272+ Assert . Equal ( 3 , children . Length ) ;
273+ Assert . Equal ( "dropdown-item" , children [ 0 ] . ClassName ) ;
274+ Assert . Equal ( "divider" , children [ 1 ] . ClassName ) ;
275+ Assert . Equal ( "dropdown-item" , children [ 2 ] . ClassName ) ;
276+ }
250277}
You can’t perform that action at this time.
0 commit comments