Skip to content

Commit 014570f

Browse files
committed
test(time-picker): Close the time picker to avoid random fails
1 parent d5b4cd0 commit 014570f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

projects/igniteui-angular/src/lib/time-picker/time-picker.component.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,11 @@ describe('IgxTimePicker', () => {
539539
it('should close the dropdown and keep the current selection on outside click in dialog mode', fakeAsync(() => {
540540
fixture.componentInstance.mode = PickerInteractionMode.Dialog;
541541
fixture.detectChanges();
542+
// close the time picker to avoid random fails, if the state is not clean
543+
if (!timePicker.collapsed) {
544+
timePicker.close();
545+
fixture.detectChanges();
546+
}
542547

543548
inputGroup.triggerEventHandler('click', UIInteractions.getMouseEvent('click'));
544549
tick();

0 commit comments

Comments
 (0)