Skip to content

Commit abd3631

Browse files
committed
test(select): Add one more test #7487
1 parent 0f66c1c commit abd3631

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

projects/igniteui-angular/src/lib/select/select.component.spec.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { IgxSelectModule } from './select.module';
1818
const CSS_CLASS_INPUT_GROUP = 'igx-input-group';
1919
const CSS_CLASS_INPUT = 'igx-input-group__input';
2020
const CSS_CLASS_INPUT_GROUP_HINT = 'igx-input-group__hint';
21+
const CSS_CLASS_HINT = 'igx-input-group__hint-item--start';
2122
const CSS_CLASS_TOGGLE_BUTTON = 'igx-icon';
2223
const CSS_CLASS_DROPDOWN_LIST_SCROLL = 'igx-drop-down__list-scroll';
2324
const CSS_CLASS_DROPDOWN_LIST = 'igx-drop-down__list';
@@ -2516,9 +2517,18 @@ describe('igxSelect', () => {
25162517
select = fixture.componentInstance.select;
25172518
fixture.detectChanges();
25182519
}));
2519-
it('should not open dropdown on hint click',
2520+
it('should not open dropdown on hint container click',
25202521
fakeAsync(() => {
2521-
const hint = fixture.debugElement.query(By.css('.' + CSS_CLASS_INPUT_GROUP_HINT));
2522+
const hintContainer = fixture.debugElement.query(By.css('.' + CSS_CLASS_INPUT_GROUP_HINT));
2523+
expect(select.collapsed).toBeTruthy();
2524+
hintContainer.nativeElement.click();
2525+
tick();
2526+
fixture.detectChanges();
2527+
expect(select.collapsed).toBeTruthy();
2528+
}));
2529+
it('should not open dropdown on hint element click',
2530+
fakeAsync(() => {
2531+
const hint = fixture.debugElement.query(By.css('.' + CSS_CLASS_HINT));
25222532
expect(select.collapsed).toBeTruthy();
25232533
hint.nativeElement.click();
25242534
tick();

0 commit comments

Comments
 (0)