@@ -17,6 +17,7 @@ import { UIInteractions } from '../../test-utils/ui-interactions.spec';
17
17
import { IGridFormGroupCreatedEventArgs } from '../common/grid.interface' ;
18
18
import { IgxTreeGridComponent } from '../tree-grid/tree-grid.component' ;
19
19
import { IgxGridComponent } from './grid.component' ;
20
+ import { AutoPositionStrategy , HorizontalAlignment , IgxOverlayService , VerticalAlignment } from '../../services/public_api' ;
20
21
21
22
describe ( 'IgxGrid - Validation #grid' , ( ) => {
22
23
@@ -187,6 +188,18 @@ describe('IgxGrid - Validation #grid', () => {
187
188
const erorrMessage = cell . errorTooltip . first . elementRef . nativeElement . children [ 0 ] . textContent ;
188
189
expect ( erorrMessage ) . toEqual ( ' Entry should be at least 4 character(s) long ' ) ;
189
190
191
+ const overlayService = TestBed . inject ( IgxOverlayService ) ;
192
+ const info = overlayService . getOverlayById ( cell . errorTooltip . first . overlayId ) ;
193
+ const positionSettings = info . settings . positionStrategy . settings ;
194
+
195
+ expect ( info . settings . positionStrategy instanceof AutoPositionStrategy ) . toBe ( true ) ;
196
+ expect ( positionSettings . horizontalStartPoint ) . toEqual ( HorizontalAlignment . Center ) ;
197
+ expect ( positionSettings . horizontalDirection ) . toEqual ( HorizontalAlignment . Center ) ;
198
+ expect ( positionSettings . verticalStartPoint ) . toEqual ( VerticalAlignment . Bottom ) ;
199
+ expect ( positionSettings . verticalDirection ) . toEqual ( VerticalAlignment . Bottom ) ;
200
+ expect ( positionSettings . openAnimation . options . params ) . toEqual ( { duration : '150ms' } ) ;
201
+ expect ( positionSettings . closeAnimation . options . params ) . toEqual ( { duration : '75ms' } ) ;
202
+
190
203
cell . errorTooltip . first . close ( ) ;
191
204
tick ( ) ;
192
205
fixture . detectChanges ( ) ;
0 commit comments