Skip to content

Commit 633c044

Browse files
fix: tests
1 parent e45b3d6 commit 633c044

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

projects/observability/src/shared/components/legend/legend.component.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createComponentFactory } from '@ngneat/spectator/jest';
2-
import { LegendComponent, LegendLayout, LegendPosition } from './legend.component';
2+
import { LegendComponent, LegendFontSize, LegendLayout, LegendPosition } from './legend.component';
33

44
describe('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

Comments
 (0)