11import { createComponentFactory } from '@ngneat/spectator/jest' ;
2- import { LegendComponent , LegendLayout , LegendPosition } from './legend.component' ;
2+ import { LegendComponent , LegendFontSize , LegendLayout , LegendPosition } from './legend.component' ;
33
44describe ( 'Legend component' , ( ) => {
55 const componentFactory = createComponentFactory ( {
@@ -8,6 +8,7 @@ describe('Legend component', () => {
88 providers : LegendComponent . buildProviders ( {
99 layout : LegendLayout . Column ,
1010 position : LegendPosition . Right ,
11+ fontSize : LegendFontSize . ExtraSmall ,
1112 series : [ ]
1213 } )
1314 } ) ;
@@ -17,6 +18,7 @@ describe('Legend component', () => {
1718 providers : LegendComponent . buildProviders ( {
1819 layout : LegendLayout . Column ,
1920 position : LegendPosition . Right ,
21+ fontSize : LegendFontSize . Small ,
2022 series : [
2123 {
2224 name : 'alpha' ,
@@ -39,13 +41,15 @@ describe('Legend component', () => {
3941 expect ( entries [ 1 ] . querySelector < HTMLElement > ( '.legend-symbol' ) ! . style . backgroundColor ) . toBe ( 'red' ) ;
4042
4143 expect ( spectator . query ( '.legend-entries' ) ) . toHaveClass ( 'legend-column' ) ;
44+ expect ( spectator . query ( '.legend-entry' ) ) . toHaveClass ( 'font-size-small' ) ;
4245 } ) ;
4346
4447 test ( 'should render in requested orientation' , ( ) => {
4548 const spectator = componentFactory ( {
4649 providers : LegendComponent . buildProviders ( {
4750 layout : LegendLayout . Row ,
4851 position : LegendPosition . Right ,
52+ fontSize : LegendFontSize . ExtraSmall ,
4953 series : [
5054 {
5155 name : 'alpha' ,
0 commit comments