Skip to content

Commit 9f2c4bc

Browse files
test(time-picker): add more scenarios & remove unused global const
1 parent e0dd4c4 commit 9f2c4bc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const CSS_CLASS_SECONDSLIST = '.igx-time-picker__secondsList';
3636
const CSS_CLASS_AMPMLIST = 'igx-time-picker__ampmList';
3737
const CSS_CLASS_SELECTED_ITEM = '.igx-time-picker__item--selected';
3838
const CSS_CLASS_HEADER_HOUR = '.igx-time-picker__header-hour';
39-
const CSS_CLASS_OVERLAY = 'igx-overlay';
4039
const CSS_CLASS_OVERLAY_WRAPPER = 'igx-overlay__wrapper';
4140
const TIME_PICKER_TOGGLE_ICON = 'access_time';
4241
const TIME_PICKER_CLEAR_ICON = 'clear';
@@ -1123,8 +1122,12 @@ describe('IgxTimePicker', () => {
11231122
expect(selectedMinutes).toEqual('45');
11241123
expect(selectedAMPM).toEqual('PM');
11251124

1126-
// ensure there is content in each element of the spinner
1127-
expect(minutesColumn.queryAll(By.css('span')).every(e => !!e.nativeElement.innerText));
1125+
// ensure there is content in each element of the spinners
1126+
// '08', '09', '10', '11', '12', '01', '02'
1127+
expect(hourColumn.queryAll(By.css('span')).every(e => !!e.nativeElement.innerText)).toBeTrue();
1128+
1129+
// '00', '15', '30', '45', '', '', '' - three empty elements to align the minutes spinner length with the hours spinner length
1130+
expect(minutesColumn.queryAll(By.css('span')).filter(e => !!e.nativeElement.innerText).length).toEqual(4);
11281131
}));
11291132
});
11301133

0 commit comments

Comments
 (0)