@@ -5,7 +5,7 @@ import { FormsModule, FormGroup, FormBuilder, FormControl, Validators, ReactiveF
5
5
import { By } from '@angular/platform-browser' ;
6
6
import { IgxDropDownModule , IgxDropDownItemComponent } from '../drop-down/index' ;
7
7
import { IgxIconModule } from '../icon/index' ;
8
- import { IgxInputGroupModule } from '../input-group/index' ;
8
+ import { IgxInputGroupModule , IgxHintDirective } from '../input-group/index' ;
9
9
import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
10
10
import { IgxSelectComponent } from './select.component' ;
11
11
import { IgxSelectItemComponent } from './select-item.component' ;
@@ -17,8 +17,6 @@ import { IgxSelectModule } from './select.module';
17
17
18
18
const CSS_CLASS_INPUT_GROUP = 'igx-input-group' ;
19
19
const CSS_CLASS_INPUT = 'igx-input-group__input' ;
20
- const CSS_CLASS_INPUT_GROUP_HINT = 'igx-input-group__hint' ;
21
- const CSS_CLASS_HINT = 'igx-input-group__hint-item--start' ;
22
20
const CSS_CLASS_TOGGLE_BUTTON = 'igx-icon' ;
23
21
const CSS_CLASS_DROPDOWN_LIST_SCROLL = 'igx-drop-down__list-scroll' ;
24
22
const CSS_CLASS_DROPDOWN_LIST = 'igx-drop-down__list' ;
@@ -2519,21 +2517,23 @@ describe('igxSelect', () => {
2519
2517
} ) ) ;
2520
2518
it ( 'should not open dropdown on hint container click' ,
2521
2519
fakeAsync ( ( ) => {
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 ( ) ;
2520
+ const hint = fixture . debugElement . query ( By . directive ( IgxHintDirective ) ) ;
2521
+ const hintContainer : HTMLElement = hint . nativeElement . parentElement ;
2522
+
2523
+ expect ( select . collapsed ) . toBeTruthy ( ) ;
2524
+ hintContainer . click ( ) ;
2525
+ tick ( ) ;
2526
+ fixture . detectChanges ( ) ;
2527
+ expect ( select . collapsed ) . toBeTruthy ( ) ;
2528
2528
} ) ) ;
2529
2529
it ( 'should not open dropdown on hint element click' ,
2530
2530
fakeAsync ( ( ) => {
2531
- const hint = fixture . debugElement . query ( By . css ( '.' + CSS_CLASS_HINT ) ) ;
2532
- expect ( select . collapsed ) . toBeTruthy ( ) ;
2533
- hint . nativeElement . click ( ) ;
2534
- tick ( ) ;
2535
- fixture . detectChanges ( ) ;
2536
- expect ( select . collapsed ) . toBeTruthy ( ) ;
2531
+ const hint = fixture . debugElement . query ( By . directive ( IgxHintDirective ) ) ;
2532
+ expect ( select . collapsed ) . toBeTruthy ( ) ;
2533
+ hint . nativeElement . click ( ) ;
2534
+ tick ( ) ;
2535
+ fixture . detectChanges ( ) ;
2536
+ expect ( select . collapsed ) . toBeTruthy ( ) ;
2537
2537
} ) ) ;
2538
2538
} ) ;
2539
2539
} ) ;
0 commit comments