@@ -810,11 +810,27 @@ describe('IgxDateRangePicker', () => {
810
810
expect ( fixture . componentInstance . dateRange . collapsed ) . toBeFalsy ( ) ;
811
811
} ) ) ;
812
812
813
- it ( 'should not expand the calendar if the default icon is clicked when disabled is set to true' , fakeAsync ( ( ) => {
813
+ it ( 'should not expand the calendar if the input is clicked in dropdown mode' , fakeAsync ( ( ) => {
814
+ UIInteractions . simulateClickAndSelectEvent ( dateRange . getEditElement ( ) ) ;
815
+ tick ( ) ;
816
+ fixture . detectChanges ( ) ;
817
+ expect ( fixture . componentInstance . dateRange . collapsed ) . toBeTruthy ( ) ;
818
+ } ) ) ;
819
+
820
+ it ( 'should expand the calendar if the input is clicked in dialog mode' , fakeAsync ( ( ) => {
821
+ dateRange . mode = PickerInteractionMode . Dialog ;
822
+ fixture . detectChanges ( ) ;
823
+ UIInteractions . simulateClickAndSelectEvent ( dateRange . getEditElement ( ) ) ;
824
+ fixture . detectChanges ( ) ;
825
+ tick ( ) ;
826
+ expect ( fixture . componentInstance . dateRange . collapsed ) . toBeFalsy ( ) ;
827
+ } ) ) ;
828
+
829
+ it ( 'should not expand the calendar if the default icon (in prefix) is clicked when disabled is set to true' , fakeAsync ( ( ) => {
814
830
fixture . componentInstance . disabled = true ;
815
831
fixture . detectChanges ( ) ;
816
- const input = fixture . debugElement . query ( By . css ( 'igx-input-group' ) ) ;
817
- input . triggerEventHandler ( 'click' , UIInteractions . getMouseEvent ( 'click' ) ) ;
832
+ const prefix = fixture . debugElement . query ( By . directive ( IgxPrefixDirective ) ) ;
833
+ prefix . triggerEventHandler ( 'click' , UIInteractions . getMouseEvent ( 'click' ) ) ;
818
834
tick ( ) ;
819
835
fixture . detectChanges ( ) ;
820
836
expect ( fixture . componentInstance . dateRange . collapsed ) . toBeTruthy ( ) ;
0 commit comments