@@ -101,6 +101,41 @@ describe('AdgenerationAdapter', function () {
101
101
snowflake : { 'id' : 'novatiqId' , syncResponse : 1 }
102
102
}
103
103
}
104
+ } ,
105
+ { // bannerWithAdgextCriteoId
106
+ bidder : 'adg' ,
107
+ params : {
108
+ id : '58278' , // banner
109
+ } ,
110
+ adUnitCode : 'adunit-code' ,
111
+ sizes : [ [ 320 , 100 ] ] ,
112
+ bidId : '2f6ac468a9c15e' ,
113
+ bidderRequestId : '14a9f773e30243' ,
114
+ auctionId : '4aae9f05-18c6-4fcd-80cf-282708cd584a' ,
115
+ transactionTd : 'f76f6dfd-d64f-4645-a29f-682bac7f431a' ,
116
+ userId : {
117
+ criteoId : 'criteo-id-test-1234567890'
118
+ }
119
+ } ,
120
+ { // bannerWithAdgextId5Id
121
+ bidder : 'adg' ,
122
+ params : {
123
+ id : '58278' , // banner
124
+ } ,
125
+ adUnitCode : 'adunit-code' ,
126
+ sizes : [ [ 320 , 100 ] ] ,
127
+ bidId : '2f6ac468a9c15e' ,
128
+ bidderRequestId : '14a9f773e30243' ,
129
+ auctionId : '4aae9f05-18c6-4fcd-80cf-282708cd584a' ,
130
+ transactionTd : 'f76f6dfd-d64f-4645-a29f-682bac7f431a' ,
131
+ userId : {
132
+ id5id : {
133
+ ext : {
134
+ linkType : 2
135
+ } ,
136
+ uid : 'id5-id-test-1234567890'
137
+ }
138
+ }
104
139
}
105
140
] ;
106
141
const bidderRequest = {
@@ -109,10 +144,12 @@ describe('AdgenerationAdapter', function () {
109
144
}
110
145
} ;
111
146
const data = {
112
- banner : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100¤cy=JPY&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.3.0&imark=1&tp=https%3A%2F%2Fexample.com` ,
113
- bannerUSD : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100¤cy=USD&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.3.0&imark=1&tp=https%3A%2F%2Fexample.com` ,
114
- native : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1¤cy=JPY&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.3.0&tp=https%3A%2F%2Fexample.com` ,
115
- bannerWithHyperId : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100¤cy=JPY&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.3.0&imark=1&tp=https%3A%2F%2Fexample.com&hyper_id=novatiqId` ,
147
+ banner : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100¤cy=JPY&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.4.0&imark=1&tp=https%3A%2F%2Fexample.com` ,
148
+ bannerUSD : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100¤cy=USD&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.4.0&imark=1&tp=https%3A%2F%2Fexample.com` ,
149
+ native : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1¤cy=JPY&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.4.0&tp=https%3A%2F%2Fexample.com` ,
150
+ bannerWithHyperId : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100¤cy=JPY&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.4.0&imark=1&tp=https%3A%2F%2Fexample.com&hyper_id=novatiqId` ,
151
+ bannerWithAdgextCriteoId : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100¤cy=JPY&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.4.0&adgext_criteo_id=criteo-id-test-1234567890&imark=1&tp=https%3A%2F%2Fexample.com` ,
152
+ bannerWithAdgextId5Id : `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100¤cy=JPY&pbver=${ prebid . version } &sdkname=prebidjs&adapterver=1.4.0&adgext_id5_id=id5-id-test-1234567890&adgext_id5_id_link_type=2&imark=1&tp=https%3A%2F%2Fexample.com` ,
116
153
} ;
117
154
it ( 'sends bid request to ENDPOINT via GET' , function ( ) {
118
155
const request = spec . buildRequests ( bidRequests , bidderRequest ) [ 0 ] ;
@@ -149,6 +186,17 @@ describe('AdgenerationAdapter', function () {
149
186
} ) ;
150
187
expect ( request . data ) . to . equal ( data . bannerWithHyperId ) ;
151
188
} ) ;
189
+
190
+ it ( 'should attache params to the bannerWithAdgextCriteoId request' , function ( ) {
191
+ const request = spec . buildRequests ( bidRequests , bidderRequest ) [ 3 ] ;
192
+ expect ( request . data ) . to . equal ( data . bannerWithAdgextCriteoId ) ;
193
+ } ) ;
194
+
195
+ it ( 'should attache params to the bannerWithAdgextId5Id request' , function ( ) {
196
+ const request = spec . buildRequests ( bidRequests , bidderRequest ) [ 4 ] ;
197
+ expect ( request . data ) . to . equal ( data . bannerWithAdgextId5Id ) ;
198
+ } ) ;
199
+
152
200
it ( 'allows setConfig to set bidder currency for JPY' , function ( ) {
153
201
config . setConfig ( {
154
202
currency : {
0 commit comments