Skip to content

Commit 6ae7e02

Browse files
committed
test(date-picker): use fakeAsync only
1 parent 6b3224d commit 6ae7e02

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

projects/igniteui-angular/date-picker/src/date-picker/date-picker.component.spec.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,24 +1682,25 @@ describe('IgxDatePicker', () => {
16821682
}).compileComponents();
16831683

16841684
fixture = TestBed.createComponent(IgxDatePickerNgModelComponent);
1685-
await fixture.whenStable();
1685+
fixture.detectChanges();
16861686
});
16871687

1688-
it('should not throw ExpressionChangedAfterItHasBeenCheckedError when closing - issue #17305', fakeAsync(async () => {
1688+
it('should not throw ExpressionChangedAfterItHasBeenCheckedError when closing - issue #17305', fakeAsync(() => {
16891689
datePicker = fixture.componentInstance.datePicker;
16901690

16911691
datePicker.open();
1692-
await fixture.whenStable();
1692+
fixture.detectChanges();
1693+
tick();
16931694

1694-
expect(async () => {
1695+
expect(() => {
16951696
datePicker.close();
16961697
fixture.detectChanges();
1697-
tick(100);
1698-
await fixture.whenStable();
1699-
1700-
const input = fixture.debugElement.query(By.css('input'));
1701-
expect(input.nativeElement.getAttribute('aria-expanded')).toBe('false');
17021698
}).not.toThrow();
1699+
1700+
fixture.detectChanges();
1701+
tick(100);
1702+
const input = fixture.debugElement.query(By.css('input'));
1703+
expect(input.nativeElement.getAttribute('aria-expanded')).toBe('false');
17031704
}));
17041705
});
17051706
});

0 commit comments

Comments
 (0)