File tree Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -829,20 +829,27 @@ function renderBid(bid) {
829
829
hideSmartAdServerIframe ( adUnitElement ) ;
830
830
831
831
// configure renderer
832
- const config = bid . renderer . getConfig ( ) ;
832
+ const defaultConfig = {
833
+ align : 'center' ,
834
+ position : 'append' ,
835
+ closeButton : false ,
836
+ label : undefined ,
837
+ collapse : true
838
+ } ;
839
+ const config = { ...defaultConfig , ...bid . renderer . getConfig ( ) } ;
833
840
bid . renderer . push ( ( ) => {
834
841
window . MagniteApex . renderAd ( {
835
842
width : bid . width ,
836
843
height : bid . height ,
837
844
vastUrl : bid . vastUrl ,
838
845
placement : {
839
846
attachTo : adUnitElement ,
840
- align : config . align || 'center' ,
841
- position : config . position || 'append'
847
+ align : config . align ,
848
+ position : config . position
842
849
} ,
843
- closeButton : config . closeButton || false ,
844
- label : config . label || undefined ,
845
- collapse : config . collapse || true
850
+ closeButton : config . closeButton ,
851
+ label : config . label ,
852
+ collapse : config . collapse
846
853
} ) ;
847
854
} ) ;
848
855
}
Original file line number Diff line number Diff line change @@ -3899,7 +3899,8 @@ describe('the rubicon adapter', function () {
3899
3899
config . setConfig ( { rubicon : {
3900
3900
rendererConfig : {
3901
3901
align : 'left' ,
3902
- closeButton : true
3902
+ closeButton : true ,
3903
+ collapse : false
3903
3904
} ,
3904
3905
rendererUrl : 'https://example.test/renderer.js'
3905
3906
} } ) ;
@@ -3971,7 +3972,8 @@ describe('the rubicon adapter', function () {
3971
3972
expect ( typeof bids [ 0 ] . renderer ) . to . equal ( 'object' ) ;
3972
3973
expect ( bids [ 0 ] . renderer . getConfig ( ) ) . to . deep . equal ( {
3973
3974
align : 'left' ,
3974
- closeButton : true
3975
+ closeButton : true ,
3976
+ collapse : false
3975
3977
} ) ;
3976
3978
expect ( bids [ 0 ] . renderer . url ) . to . equal ( 'https://example.test/renderer.js' ) ;
3977
3979
} ) ;
@@ -4025,7 +4027,7 @@ describe('the rubicon adapter', function () {
4025
4027
const renderCall = window . MagniteApex . renderAd . getCall ( 0 ) ;
4026
4028
expect ( renderCall . args [ 0 ] ) . to . deep . equal ( {
4027
4029
closeButton : true ,
4028
- collapse : true ,
4030
+ collapse : false ,
4029
4031
height : 320 ,
4030
4032
label : undefined ,
4031
4033
placement : {
@@ -4094,7 +4096,7 @@ describe('the rubicon adapter', function () {
4094
4096
const renderCall = window . MagniteApex . renderAd . getCall ( 0 ) ;
4095
4097
expect ( renderCall . args [ 0 ] ) . to . deep . equal ( {
4096
4098
closeButton : true ,
4097
- collapse : true ,
4099
+ collapse : false ,
4098
4100
height : 480 ,
4099
4101
label : undefined ,
4100
4102
placement : {
You can’t perform that action at this time.
0 commit comments