@@ -406,13 +406,13 @@ public async Task IsDisabled_Ok()
406406 pb . AddChildContent < DisableTabItemButton > ( ) ;
407407 } ) ;
408408 } ) ;
409- Assert . Contains ( "<div role=\" tab\" class=\" tabs-item disabled\" ><i class=\" fa fa-fa\" ></i><span class=\" tabs-item-text\" >Text1</span></div>" , cut . Markup ) ;
409+ Assert . Contains ( "<div role=\" tab\" class=\" tabs-item disabled\" ><div class= \" tabs-item-body \" >< i class=\" fa fa-fa\" ></i><span class=\" tabs-item-text\" >Text1</span></div ></div>" , cut . Markup ) ;
410410
411411 var button = cut . FindComponent < DisableTabItemButton > ( ) ;
412412 Assert . NotNull ( button ) ;
413413
414414 await cut . InvokeAsync ( ( ) => button . Instance . OnDisabledTabItem ( ) ) ;
415- Assert . Contains ( "<div role=\" tab\" class=\" tabs-item active disabled\" ><span class=\" tabs-item-text\" >Text2</span></div>" , cut . Markup ) ;
415+ Assert . Contains ( "<div role=\" tab\" class=\" tabs-item disabled\" ><div class= \" tabs-item-body \" >< span class=\" tabs-item-text\" >Text2</span></div ></div>" , cut . Markup ) ;
416416 }
417417
418418 [ Fact ]
@@ -422,6 +422,47 @@ public void SetDisabled_Ok()
422422 cut . Instance . SetDisabled ( true ) ;
423423 }
424424
425+ [ Fact ]
426+ public async Task TabStyle_Chrome_Ok ( )
427+ {
428+ var clicked = false ;
429+ var cut = Context . RenderComponent < Tab > ( pb =>
430+ {
431+ pb . Add ( a => a . TabStyle , TabStyle . Chrome ) ;
432+ pb . Add ( a => a . OnClickTabItemAsync , item =>
433+ {
434+ clicked = true ;
435+ return Task . CompletedTask ;
436+ } ) ;
437+ pb . AddChildContent < TabItem > ( pb =>
438+ {
439+ pb . Add ( a => a . Text , "Text1" ) ;
440+ pb . Add ( a => a . ChildContent , builder => builder . AddContent ( 0 , "Test1" ) ) ;
441+ pb . Add ( a => a . Icon , "fa fa-fa" ) ;
442+ } ) ;
443+ pb . AddChildContent < TabItem > ( pb =>
444+ {
445+ pb . Add ( a => a . IsActive , true ) ;
446+ pb . Add ( a => a . Text , "Text2" ) ;
447+ pb . AddChildContent < DisableTabItemButton > ( ) ;
448+ } ) ;
449+ } ) ;
450+ cut . Contains ( "tabs tabs-top tabs-chrome" ) ;
451+ cut . Contains ( "tabs-item-wrap active" ) ;
452+ cut . Contains ( "<i class=\" tab-corner tab-corner-left\" ></i>" ) ;
453+ cut . Contains ( "<i class=\" tab-corner tab-corner-right\" ></i>" ) ;
454+
455+ var button = cut . FindComponent < DisableTabItemButton > ( ) ;
456+ Assert . NotNull ( button ) ;
457+ await cut . InvokeAsync ( ( ) => button . Instance . OnDisabledTabItem ( ) ) ;
458+ cut . Contains ( "<div role=\" tab\" class=\" tabs-item disabled\" ><div class=\" tabs-item-body\" ><span class=\" tabs-item-text\" >Text2</span></div></div>" ) ;
459+
460+ // trigger click
461+ var link = cut . Find ( "a" ) ;
462+ await cut . InvokeAsync ( ( ) => link . Click ( ) ) ;
463+ Assert . True ( clicked ) ;
464+ }
465+
425466 [ Fact ]
426467 public void MenuItem_Null ( )
427468 {
0 commit comments