@@ -68,6 +68,7 @@ describe('Card', () => {
6868 InitCardComponent ,
6969 InitOutlinedCardComponent ,
7070 CardWithHeaderComponent ,
71+ CardContentIconComponent ,
7172 VerticalCardComponent ,
7273 HorizontalCardComponent
7374 ]
@@ -182,6 +183,16 @@ describe('Card', () => {
182183 expect ( actions ) . not . toHaveClass ( classes . actions . vertical ) ;
183184 } ) ;
184185
186+ it ( 'Should use Material Icons font-family for igx-icon in card content' , ( ) => {
187+ const fixture = TestBed . createComponent ( CardContentIconComponent ) ;
188+ fixture . detectChanges ( ) ;
189+
190+ const iconElement = fixture . debugElement . query ( By . css ( 'igx-icon' ) ) . nativeElement ;
191+ const computedStyle = window . getComputedStyle ( iconElement ) ;
192+
193+ expect ( computedStyle . fontFamily ) . toBe ( '"Material Icons"' ) ;
194+ } ) ;
195+
185196 it ( 'Should automatically align actions vertically when in horizontal layout' , ( ) => {
186197 const fixture = TestBed . createComponent ( HorizontalCardComponent ) ;
187198 fixture . detectChanges ( ) ;
@@ -249,6 +260,17 @@ class InitOutlinedCardComponent {
249260} )
250261class CardWithHeaderComponent { }
251262
263+ @Component ( {
264+ template : `<igx-card class="ig-typography">
265+ <igx-card-content>
266+ <igx-icon>face</igx-icon>
267+ </igx-card-content>
268+ <igx-card>` ,
269+ standalone : true ,
270+ imports : [ IgxCardComponent , IgxCardContentDirective , IgxIconComponent ]
271+ } )
272+ class CardContentIconComponent { }
273+
252274@Component ( {
253275 template : `<igx-card>
254276 <igx-card-media width="200px" height="50%">
0 commit comments