Skip to content

Commit

Permalink
test(demo): fix button tests
Browse files Browse the repository at this point in the history
  • Loading branch information
homj committed Jul 11, 2024
1 parent 2a7ef76 commit b341312
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/demo/src/app/components/button/button.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('ButtonComponent', () => {
disabled = false;
loading = false;
appearance: ButtonAppearance = 'solid';
color: ButtonColor = 'red';
color?: ButtonColor;
}

let fixture: ComponentFixture<TestHostComponent>;
Expand Down Expand Up @@ -133,6 +133,8 @@ describe('ButtonComponent', () => {
it('should be changeable', () => {
host.disabled = true;

fixture.detectChanges();

expect(button.disabled()).toBe(true);
});

Expand Down Expand Up @@ -165,6 +167,8 @@ describe('ButtonComponent', () => {
it('should be changeable', () => {
host.loading = true;

fixture.detectChanges();

expect(button.loading()).toBe(true);
});

Expand All @@ -187,6 +191,8 @@ describe('ButtonComponent', () => {
it('should be changeable', () => {
host.appearance = 'outline';

fixture.detectChanges();

expect(button.appearance()).toBe('outline');
});

Expand All @@ -209,6 +215,8 @@ describe('ButtonComponent', () => {
it('should be changeable', () => {
host.color = 'red';

fixture.detectChanges();

expect(button.color()).toBe('red');
});

Expand Down

0 comments on commit b341312

Please sign in to comment.