@@ -1378,6 +1378,37 @@ describe('igxOverlay', () => {
13781378 expect ( overlayContent . style . getPropertyValue ( '--ig-size' ) ) . toEqual ( '1' ) ;
13791379 overlayInstance . detach ( firstCallId ) ;
13801380 } ) ) ;
1381+
1382+ fit ( '#15228 - Should use provided in show overlay settings ' , fakeAsync ( ( ) => {
1383+ const fixture = TestBed . createComponent ( SimpleRefComponent ) ;
1384+ fixture . detectChanges ( ) ;
1385+ const overlayInstance = fixture . componentInstance . overlay ;
1386+ const id = overlayInstance . attach ( SimpleDynamicComponent ) ;
1387+ const info = overlayInstance . getOverlayById ( id ) ;
1388+ const initialPositionSpy = spyOn ( info . settings . positionStrategy , 'position' ) . and . callThrough ( ) ;
1389+
1390+ overlayInstance . show ( id ) ;
1391+ tick ( ) ;
1392+
1393+ expect ( initialPositionSpy ) . toHaveBeenCalledTimes ( 1 ) ;
1394+ overlayInstance . hide ( id ) ;
1395+ tick ( ) ;
1396+
1397+ const os : OverlaySettings = {
1398+ excludeFromOutsideClick : [ ] ,
1399+ positionStrategy : new GlobalPositionStrategy ( ) ,
1400+ scrollStrategy : new CloseScrollStrategy ( ) ,
1401+ modal : false ,
1402+ closeOnOutsideClick : false ,
1403+ closeOnEscape : true
1404+ } ;
1405+ const lastPositionSpy = spyOn ( os . positionStrategy , 'position' ) . and . callThrough ( ) ;
1406+ overlayInstance . show ( id , os ) ;
1407+ tick ( ) ;
1408+
1409+ expect ( lastPositionSpy ) . toHaveBeenCalledTimes ( 1 ) ;
1410+ expect ( info . settings ) . toBe ( os ) ;
1411+ } ) ) ;
13811412 } ) ;
13821413
13831414 describe ( 'Unit Tests - Scroll Strategies: ' , ( ) => {
0 commit comments