From b341312f3b951b92d00866219e1bdee5e6cb8297 Mon Sep 17 00:00:00 2001 From: Johannes Homeier Date: Thu, 11 Jul 2024 15:59:25 +0200 Subject: [PATCH] test(demo): fix button tests --- .../src/app/components/button/button.component.spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/demo/src/app/components/button/button.component.spec.ts b/apps/demo/src/app/components/button/button.component.spec.ts index c267f7b..8c70ef5 100644 --- a/apps/demo/src/app/components/button/button.component.spec.ts +++ b/apps/demo/src/app/components/button/button.component.spec.ts @@ -100,7 +100,7 @@ describe('ButtonComponent', () => { disabled = false; loading = false; appearance: ButtonAppearance = 'solid'; - color: ButtonColor = 'red'; + color?: ButtonColor; } let fixture: ComponentFixture; @@ -133,6 +133,8 @@ describe('ButtonComponent', () => { it('should be changeable', () => { host.disabled = true; + fixture.detectChanges(); + expect(button.disabled()).toBe(true); }); @@ -165,6 +167,8 @@ describe('ButtonComponent', () => { it('should be changeable', () => { host.loading = true; + fixture.detectChanges(); + expect(button.loading()).toBe(true); }); @@ -187,6 +191,8 @@ describe('ButtonComponent', () => { it('should be changeable', () => { host.appearance = 'outline'; + fixture.detectChanges(); + expect(button.appearance()).toBe('outline'); }); @@ -209,6 +215,8 @@ describe('ButtonComponent', () => { it('should be changeable', () => { host.color = 'red'; + fixture.detectChanges(); + expect(button.color()).toBe('red'); });