prebid.js 5.19.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc.js +1 -10
- package/README.md +4 -2
- package/browsers.json +13 -37
- package/gulpfile.js +1 -0
- package/karma.conf.maker.js +1 -1
- package/modules/adheseBidAdapter.js +7 -2
- package/modules/adkernelBidAdapter.js +1 -0
- package/modules/adlivetechBidAdapter.md +61 -0
- package/modules/admixerBidAdapter.js +2 -1
- package/modules/adnuntiusBidAdapter.js +2 -1
- package/modules/adomikAnalyticsAdapter.js +10 -4
- package/modules/adplusBidAdapter.js +203 -0
- package/modules/adplusBidAdapter.md +39 -0
- package/modules/adyoulikeBidAdapter.js +7 -2
- package/modules/airgridRtdProvider.js +1 -1
- package/modules/appnexusBidAdapter.js +28 -5
- package/modules/atsAnalyticsAdapter.js +67 -46
- package/modules/atsAnalyticsAdapter.md +1 -0
- package/modules/beachfrontBidAdapter.js +14 -17
- package/modules/betweenBidAdapter.js +2 -1
- package/modules/browsiRtdProvider.js +106 -18
- package/modules/cleanioRtdProvider.js +192 -0
- package/modules/cleanioRtdProvider.md +59 -0
- package/modules/codefuelBidAdapter.js +1 -3
- package/modules/codefuelBidAdapter.md +3 -3
- package/modules/craftBidAdapter.js +5 -3
- package/modules/datablocksBidAdapter.js +3 -3
- package/modules/dchain.js +149 -0
- package/modules/dchain.md +45 -0
- package/modules/deepintentBidAdapter.js +1 -1
- package/modules/deltaprojectsBidAdapter.js +252 -0
- package/modules/deltaprojectsBidAdapter.md +32 -0
- package/modules/emx_digitalBidAdapter.js +9 -1
- package/modules/engageyaBidAdapter.js +68 -54
- package/modules/freewheel-sspBidAdapter.js +6 -0
- package/modules/glimpseBidAdapter.js +31 -16
- package/modules/goldbachBidAdapter.js +1176 -0
- package/modules/goldbachBidAdapter.md +151 -0
- package/modules/gptPreAuction.js +11 -5
- package/modules/gridBidAdapter.js +1 -0
- package/modules/gumgumBidAdapter.js +5 -1
- package/modules/id5IdSystem.md +6 -6
- package/modules/imRtdProvider.js +31 -0
- package/modules/intersectionRtdProvider.js +114 -0
- package/modules/invibesBidAdapter.js +15 -9
- package/modules/ipromBidAdapter.js +79 -0
- package/modules/ixBidAdapter.js +173 -22
- package/modules/jixieBidAdapter.js +8 -2
- package/modules/justpremiumBidAdapter.js +6 -1
- package/modules/limelightDigitalBidAdapter.js +2 -1
- package/modules/livewrappedAnalyticsAdapter.js +5 -0
- package/modules/luponmediaBidAdapter.js +570 -0
- package/modules/merkleIdSystem.js +5 -0
- package/modules/missenaBidAdapter.js +89 -0
- package/modules/multibid/index.js +3 -3
- package/modules/nativoBidAdapter.js +32 -2
- package/modules/oguryBidAdapter.js +2 -1
- package/modules/openxBidAdapter.js +7 -2
- package/modules/operaadsBidAdapter.js +21 -1
- package/modules/otmBidAdapter.js +146 -0
- package/modules/otmBidAdapter.md +27 -26
- package/modules/outbrainBidAdapter.js +5 -0
- package/modules/playwireBidAdapter.md +61 -0
- package/modules/prebidServerBidAdapter/index.js +3 -3
- package/modules/pubmaticBidAdapter.js +5 -3
- package/modules/relaidoBidAdapter.js +86 -65
- package/modules/richaudienceBidAdapter.js +1 -1
- package/modules/rtdModule/index.js +2 -2
- package/modules/saambaaBidAdapter.js +420 -0
- package/modules/saambaaBidAdapter.md +65 -68
- package/modules/seedtagBidAdapter.js +6 -0
- package/modules/smaatoBidAdapter.js +9 -1
- package/modules/smartxBidAdapter.js +17 -1
- package/modules/sonobiBidAdapter.js +7 -0
- package/modules/sortableBidAdapter.js +1 -0
- package/modules/sspBCBidAdapter.js +34 -3
- package/modules/tappxBidAdapter.js +3 -1
- package/modules/teadsBidAdapter.js +3 -0
- package/modules/trustxBidAdapter.js +18 -7
- package/modules/undertoneBidAdapter.js +8 -1
- package/modules/userId/index.js +27 -2
- package/modules/ventes.md +71 -0
- package/modules/ventesBidAdapter.js +410 -0
- package/modules/ventesBidAdapter.md +93 -0
- package/modules/vidoomyBidAdapter.js +51 -100
- package/modules/visxBidAdapter.js +20 -3
- package/modules/visxBidAdapter.md +4 -6
- package/modules/yahoosspBidAdapter.js +6 -6
- package/modules/yahoosspBidAdapter.md +1 -1
- package/modules/yieldlabBidAdapter.js +41 -10
- package/modules/yieldlabBidAdapter.md +91 -48
- package/modules/yieldoneBidAdapter.js +115 -11
- package/package.json +6 -1
- package/src/adapterManager.js +14 -8
- package/src/auction.js +14 -13
- package/src/targeting.js +2 -2
- package/src/utils.js +7 -0
- package/test/spec/integration/faker/googletag.js +6 -0
- package/test/spec/modules/adheseBidAdapter_spec.js +27 -1
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +18 -0
- package/test/spec/modules/adomikAnalyticsAdapter_spec.js +3 -1
- package/test/spec/modules/adplusBidAdapter_spec.js +213 -0
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +26 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +65 -2
- package/test/spec/modules/atsAnalyticsAdapter_spec.js +42 -9
- package/test/spec/modules/beachfrontBidAdapter_spec.js +65 -1
- package/test/spec/modules/browsiRtdProvider_spec.js +62 -7
- package/test/spec/modules/cleanioRtdProvider_spec.js +188 -0
- package/test/spec/modules/codefuelBidAdapter_spec.js +1 -1
- package/test/spec/modules/datablocksBidAdapter_spec.js +3 -3
- package/test/spec/modules/dchain_spec.js +329 -0
- package/test/spec/modules/deltaprojectsBidAdapter_spec.js +399 -0
- package/test/spec/modules/emx_digitalBidAdapter_spec.js +10 -0
- package/test/spec/modules/engageyaBidAdapter_spec.js +231 -95
- package/test/spec/modules/eplanningBidAdapter_spec.js +8 -8
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +19 -0
- package/test/spec/modules/glimpseBidAdapter_spec.js +33 -0
- package/test/spec/modules/goldbachBidAdapter_spec.js +1359 -0
- package/test/spec/modules/gptPreAuction_spec.js +58 -4
- package/test/spec/modules/gumgumBidAdapter_spec.js +6 -0
- package/test/spec/modules/imRtdProvider_spec.js +25 -0
- package/test/spec/modules/intersectionRtdProvider_spec.js +141 -0
- package/test/spec/modules/invibesBidAdapter_spec.js +29 -4
- package/test/spec/modules/ipromBidAdapter_spec.js +195 -0
- package/test/spec/modules/ixBidAdapter_spec.js +288 -5
- package/test/spec/modules/jixieBidAdapter_spec.js +13 -11
- package/test/spec/modules/justpremiumBidAdapter_spec.js +9 -2
- package/test/spec/modules/konduitWrapper_spec.js +0 -1
- package/test/spec/modules/limelightDigitalBidAdapter_spec.js +10 -7
- package/test/spec/modules/livewrappedAnalyticsAdapter_spec.js +23 -4
- package/test/spec/modules/luponmediaBidAdapter_spec.js +412 -0
- package/test/spec/modules/merkleIdSystem_spec.js +18 -0
- package/test/spec/modules/missenaBidAdapter_spec.js +134 -0
- package/test/spec/modules/multibid_spec.js +31 -31
- package/test/spec/modules/nativoBidAdapter_spec.js +35 -18
- package/test/spec/modules/oguryBidAdapter_spec.js +13 -11
- package/test/spec/modules/openxBidAdapter_spec.js +5 -26
- package/test/spec/modules/operaadsBidAdapter_spec.js +38 -6
- package/test/spec/modules/otmBidAdapter_spec.js +67 -0
- package/test/spec/modules/outbrainBidAdapter_spec.js +18 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +19 -2
- package/test/spec/modules/pubmaticBidAdapter_spec.js +1 -1
- package/test/spec/modules/relaidoBidAdapter_spec.js +71 -63
- package/test/spec/modules/seedtagBidAdapter_spec.js +3 -0
- package/test/spec/modules/smaatoBidAdapter_spec.js +61 -0
- package/test/spec/modules/smartxBidAdapter_spec.js +9 -0
- package/test/spec/modules/sonobiBidAdapter_spec.js +34 -1
- package/test/spec/modules/sortableBidAdapter_spec.js +11 -0
- package/test/spec/modules/sspBCBidAdapter_spec.js +33 -3
- package/test/spec/modules/tappxBidAdapter_spec.js +4 -0
- package/test/spec/modules/teadsBidAdapter_spec.js +132 -0
- package/test/spec/modules/trustxBidAdapter_spec.js +45 -3
- package/test/spec/modules/userId_spec.js +51 -0
- package/test/spec/modules/ventesBidAdapter_spec.js +845 -0
- package/test/spec/modules/vidoomyBidAdapter_spec.js +32 -13
- package/test/spec/modules/visxBidAdapter_spec.js +121 -5
- package/test/spec/modules/yieldlabBidAdapter_spec.js +81 -0
- package/test/spec/modules/yieldoneBidAdapter_spec.js +299 -53
- package/test/spec/unit/core/adapterManager_spec.js +26 -7
- package/test/spec/unit/core/targeting_spec.js +44 -0
- package/wdio.conf.js +1 -1
|
@@ -82,7 +82,7 @@ describe('multibid adapter', function () {
|
|
|
82
82
|
'sizes': [[300, 250]]
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
'adUnitCode': 'test
|
|
85
|
+
'adUnitCode': 'test.div',
|
|
86
86
|
'transactionId': 'c153f3da-84f0-4be8-95cb-0647c458bc60',
|
|
87
87
|
'sizes': [[300, 250]],
|
|
88
88
|
'bidId': '2408ef83b84c9d',
|
|
@@ -106,7 +106,7 @@ describe('multibid adapter', function () {
|
|
|
106
106
|
'sizes': [[300, 250]]
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
-
'adUnitCode': 'test
|
|
109
|
+
'adUnitCode': 'test.div',
|
|
110
110
|
'transactionId': 'c153f3da-84f0-4be8-95cb-0647c458bc60',
|
|
111
111
|
'sizes': [[300, 250]],
|
|
112
112
|
'bidId': '2408ef83b84c9d',
|
|
@@ -197,14 +197,14 @@ describe('multibid adapter', function () {
|
|
|
197
197
|
});
|
|
198
198
|
|
|
199
199
|
it('adds original bids and does not modify', function () {
|
|
200
|
-
let adUnitCode = 'test
|
|
200
|
+
let adUnitCode = 'test.div';
|
|
201
201
|
let bids = [{...bidArray[0]}, {...bidArray[1]}];
|
|
202
202
|
|
|
203
203
|
addBidResponseHook(callbackFn, adUnitCode, {...bids[0]});
|
|
204
204
|
|
|
205
205
|
expect(result).to.not.equal(null);
|
|
206
206
|
expect(result.adUnitCode).to.not.equal(null);
|
|
207
|
-
expect(result.adUnitCode).to.equal('test
|
|
207
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
208
208
|
expect(result.bid).to.not.equal(null);
|
|
209
209
|
expect(result.bid).to.deep.equal(bids[0]);
|
|
210
210
|
|
|
@@ -214,13 +214,13 @@ describe('multibid adapter', function () {
|
|
|
214
214
|
|
|
215
215
|
expect(result).to.not.equal(null);
|
|
216
216
|
expect(result.adUnitCode).to.not.equal(null);
|
|
217
|
-
expect(result.adUnitCode).to.equal('test
|
|
217
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
218
218
|
expect(result.bid).to.not.equal(null);
|
|
219
219
|
expect(result.bid).to.deep.equal(bids[1]);
|
|
220
220
|
});
|
|
221
221
|
|
|
222
222
|
it('modifies and adds both bids based on multibid configuration', function () {
|
|
223
|
-
let adUnitCode = 'test
|
|
223
|
+
let adUnitCode = 'test.div';
|
|
224
224
|
let bids = [{...bidArray[0]}, {...bidArray[1]}];
|
|
225
225
|
|
|
226
226
|
config.setConfig({multibid: [{bidder: 'bidderA', maxBids: 2, targetBiddercodePrefix: 'bidA'}]});
|
|
@@ -232,7 +232,7 @@ describe('multibid adapter', function () {
|
|
|
232
232
|
|
|
233
233
|
expect(result).to.not.equal(null);
|
|
234
234
|
expect(result.adUnitCode).to.not.equal(null);
|
|
235
|
-
expect(result.adUnitCode).to.equal('test
|
|
235
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
236
236
|
expect(result.bid).to.not.equal(null);
|
|
237
237
|
expect(result.bid).to.deep.equal(bids[0]);
|
|
238
238
|
|
|
@@ -250,13 +250,13 @@ describe('multibid adapter', function () {
|
|
|
250
250
|
|
|
251
251
|
expect(result).to.not.equal(null);
|
|
252
252
|
expect(result.adUnitCode).to.not.equal(null);
|
|
253
|
-
expect(result.adUnitCode).to.equal('test
|
|
253
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
254
254
|
expect(result.bid).to.not.equal(null);
|
|
255
255
|
expect(result.bid).to.deep.equal(bids[1]);
|
|
256
256
|
});
|
|
257
257
|
|
|
258
258
|
it('only modifies bids defined in the multibid configuration', function () {
|
|
259
|
-
let adUnitCode = 'test
|
|
259
|
+
let adUnitCode = 'test.div';
|
|
260
260
|
let bids = [{...bidArray[0]}, {...bidArray[1]}];
|
|
261
261
|
|
|
262
262
|
bids.push({
|
|
@@ -276,7 +276,7 @@ describe('multibid adapter', function () {
|
|
|
276
276
|
|
|
277
277
|
expect(result).to.not.equal(null);
|
|
278
278
|
expect(result.adUnitCode).to.not.equal(null);
|
|
279
|
-
expect(result.adUnitCode).to.equal('test
|
|
279
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
280
280
|
expect(result.bid).to.not.equal(null);
|
|
281
281
|
expect(result.bid).to.deep.equal(bids[0]);
|
|
282
282
|
|
|
@@ -292,7 +292,7 @@ describe('multibid adapter', function () {
|
|
|
292
292
|
|
|
293
293
|
expect(result).to.not.equal(null);
|
|
294
294
|
expect(result.adUnitCode).to.not.equal(null);
|
|
295
|
-
expect(result.adUnitCode).to.equal('test
|
|
295
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
296
296
|
expect(result.bid).to.not.equal(null);
|
|
297
297
|
expect(result.bid).to.deep.equal(bids[1]);
|
|
298
298
|
|
|
@@ -302,13 +302,13 @@ describe('multibid adapter', function () {
|
|
|
302
302
|
|
|
303
303
|
expect(result).to.not.equal(null);
|
|
304
304
|
expect(result.adUnitCode).to.not.equal(null);
|
|
305
|
-
expect(result.adUnitCode).to.equal('test
|
|
305
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
306
306
|
expect(result.bid).to.not.equal(null);
|
|
307
307
|
expect(result.bid).to.deep.equal(bids[2]);
|
|
308
308
|
});
|
|
309
309
|
|
|
310
310
|
it('only modifies and returns bids under limit for a specifc bidder in the multibid configuration', function () {
|
|
311
|
-
let adUnitCode = 'test
|
|
311
|
+
let adUnitCode = 'test.div';
|
|
312
312
|
let bids = [{...bidArray[0]}, {...bidArray[1]}];
|
|
313
313
|
|
|
314
314
|
bids.push({
|
|
@@ -328,7 +328,7 @@ describe('multibid adapter', function () {
|
|
|
328
328
|
|
|
329
329
|
expect(result).to.not.equal(null);
|
|
330
330
|
expect(result.adUnitCode).to.not.equal(null);
|
|
331
|
-
expect(result.adUnitCode).to.equal('test
|
|
331
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
332
332
|
expect(result.bid).to.not.equal(null);
|
|
333
333
|
expect(result.bid).to.deep.equal(bids[0]);
|
|
334
334
|
|
|
@@ -344,7 +344,7 @@ describe('multibid adapter', function () {
|
|
|
344
344
|
|
|
345
345
|
expect(result).to.not.equal(null);
|
|
346
346
|
expect(result.adUnitCode).to.not.equal(null);
|
|
347
|
-
expect(result.adUnitCode).to.equal('test
|
|
347
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
348
348
|
expect(result.bid).to.not.equal(null);
|
|
349
349
|
expect(result.bid).to.deep.equal(bids[1]);
|
|
350
350
|
|
|
@@ -356,7 +356,7 @@ describe('multibid adapter', function () {
|
|
|
356
356
|
});
|
|
357
357
|
|
|
358
358
|
it('if no prefix in multibid configuration, modifies and returns bids under limit without preifx property', function () {
|
|
359
|
-
let adUnitCode = 'test
|
|
359
|
+
let adUnitCode = 'test.div';
|
|
360
360
|
let bids = [{...bidArray[0]}, {...bidArray[1]}];
|
|
361
361
|
|
|
362
362
|
bids.push({
|
|
@@ -375,7 +375,7 @@ describe('multibid adapter', function () {
|
|
|
375
375
|
|
|
376
376
|
expect(result).to.not.equal(null);
|
|
377
377
|
expect(result.adUnitCode).to.not.equal(null);
|
|
378
|
-
expect(result.adUnitCode).to.equal('test
|
|
378
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
379
379
|
expect(result.bid).to.not.equal(null);
|
|
380
380
|
expect(result.bid).to.deep.equal(bids[0]);
|
|
381
381
|
|
|
@@ -389,7 +389,7 @@ describe('multibid adapter', function () {
|
|
|
389
389
|
|
|
390
390
|
expect(result).to.not.equal(null);
|
|
391
391
|
expect(result.adUnitCode).to.not.equal(null);
|
|
392
|
-
expect(result.adUnitCode).to.equal('test
|
|
392
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
393
393
|
expect(result.bid).to.not.equal(null);
|
|
394
394
|
expect(result.bid).to.deep.equal(bids[1]);
|
|
395
395
|
|
|
@@ -401,7 +401,7 @@ describe('multibid adapter', function () {
|
|
|
401
401
|
});
|
|
402
402
|
|
|
403
403
|
it('does not include extra bids if cpm is less than floor value', function () {
|
|
404
|
-
let adUnitCode = 'test
|
|
404
|
+
let adUnitCode = 'test.div';
|
|
405
405
|
let bids = [{...bidArrayAlt[1]}, {...bidArrayAlt[0]}, {...bidArrayAlt[2]}, {...bidArrayAlt[3]}];
|
|
406
406
|
|
|
407
407
|
bids.map(bid => {
|
|
@@ -418,7 +418,7 @@ describe('multibid adapter', function () {
|
|
|
418
418
|
floorRuleValue: 65,
|
|
419
419
|
floorValue: 65,
|
|
420
420
|
matchedFields: {
|
|
421
|
-
gptSlot: 'test
|
|
421
|
+
gptSlot: 'test.div',
|
|
422
422
|
mediaType: 'banner'
|
|
423
423
|
}
|
|
424
424
|
}
|
|
@@ -435,7 +435,7 @@ describe('multibid adapter', function () {
|
|
|
435
435
|
|
|
436
436
|
expect(result).to.not.equal(null);
|
|
437
437
|
expect(result.adUnitCode).to.not.equal(null);
|
|
438
|
-
expect(result.adUnitCode).to.equal('test
|
|
438
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
439
439
|
expect(result.bid).to.not.equal(null);
|
|
440
440
|
expect(result.bid.bidder).to.equal('bidderA');
|
|
441
441
|
expect(result.bid.targetingBidder).to.equal(undefined);
|
|
@@ -452,7 +452,7 @@ describe('multibid adapter', function () {
|
|
|
452
452
|
|
|
453
453
|
expect(result).to.not.equal(null);
|
|
454
454
|
expect(result.adUnitCode).to.not.equal(null);
|
|
455
|
-
expect(result.adUnitCode).to.equal('test
|
|
455
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
456
456
|
expect(result.bid).to.not.equal(null);
|
|
457
457
|
expect(result.bid.bidder).to.equal('bidderB');
|
|
458
458
|
expect(result.bid.targetingBidder).to.equal(undefined);
|
|
@@ -463,14 +463,14 @@ describe('multibid adapter', function () {
|
|
|
463
463
|
|
|
464
464
|
expect(result).to.not.equal(null);
|
|
465
465
|
expect(result.adUnitCode).to.not.equal(null);
|
|
466
|
-
expect(result.adUnitCode).to.equal('test
|
|
466
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
467
467
|
expect(result.bid).to.not.equal(null);
|
|
468
468
|
expect(result.bid.bidder).to.equal('bidderC');
|
|
469
469
|
expect(result.bid.targetingBidder).to.equal(undefined);
|
|
470
470
|
});
|
|
471
471
|
|
|
472
472
|
it('does include extra bids if cpm is not less than floor value', function () {
|
|
473
|
-
let adUnitCode = 'test
|
|
473
|
+
let adUnitCode = 'test.div';
|
|
474
474
|
let bids = [{...bidArrayAlt[1]}, {...bidArrayAlt[0]}];
|
|
475
475
|
|
|
476
476
|
bids.map(bid => {
|
|
@@ -487,7 +487,7 @@ describe('multibid adapter', function () {
|
|
|
487
487
|
floorRuleValue: 25,
|
|
488
488
|
floorValue: 25,
|
|
489
489
|
matchedFields: {
|
|
490
|
-
gptSlot: 'test
|
|
490
|
+
gptSlot: 'test.div',
|
|
491
491
|
mediaType: 'banner'
|
|
492
492
|
}
|
|
493
493
|
}
|
|
@@ -504,7 +504,7 @@ describe('multibid adapter', function () {
|
|
|
504
504
|
|
|
505
505
|
expect(result).to.not.equal(null);
|
|
506
506
|
expect(result.adUnitCode).to.not.equal(null);
|
|
507
|
-
expect(result.adUnitCode).to.equal('test
|
|
507
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
508
508
|
expect(result.bid).to.not.equal(null);
|
|
509
509
|
expect(result.bid.bidder).to.equal('bidderA');
|
|
510
510
|
expect(result.bid.targetingBidder).to.equal(undefined);
|
|
@@ -518,7 +518,7 @@ describe('multibid adapter', function () {
|
|
|
518
518
|
|
|
519
519
|
expect(result).to.not.equal(null);
|
|
520
520
|
expect(result.adUnitCode).to.not.equal(null);
|
|
521
|
-
expect(result.adUnitCode).to.equal('test
|
|
521
|
+
expect(result.adUnitCode).to.equal('test.div');
|
|
522
522
|
expect(result.bid).to.not.equal(null);
|
|
523
523
|
expect(result.bid.bidder).to.equal('bidderA');
|
|
524
524
|
expect(result.bid.targetingBidder).to.equal('bidA2');
|
|
@@ -578,7 +578,7 @@ describe('multibid adapter', function () {
|
|
|
578
578
|
|
|
579
579
|
it('it sorts and creates dynamic alias on bidsReceived if multibid configuration found with prefix', function () {
|
|
580
580
|
let modifiedBids = [{...bidArray[1]}, {...bidArray[0]}].map(bid => {
|
|
581
|
-
addBidResponseHook(bidResponseCallback, 'test
|
|
581
|
+
addBidResponseHook(bidResponseCallback, 'test.div', {...bid});
|
|
582
582
|
|
|
583
583
|
return bidResult;
|
|
584
584
|
});
|
|
@@ -603,7 +603,7 @@ describe('multibid adapter', function () {
|
|
|
603
603
|
|
|
604
604
|
it('it sorts by cpm treating dynamic alias as unique bid when no bid limit defined', function () {
|
|
605
605
|
let modifiedBids = [{...bidArrayAlt[0]}, {...bidArrayAlt[2]}, {...bidArrayAlt[3]}, {...bidArrayAlt[1]}].map(bid => {
|
|
606
|
-
addBidResponseHook(bidResponseCallback, 'test
|
|
606
|
+
addBidResponseHook(bidResponseCallback, 'test.div', {...bid});
|
|
607
607
|
|
|
608
608
|
return bidResult;
|
|
609
609
|
});
|
|
@@ -636,7 +636,7 @@ describe('multibid adapter', function () {
|
|
|
636
636
|
|
|
637
637
|
it('it should filter out dynamic bid when bid limit is less than unique bid pool', function () {
|
|
638
638
|
let modifiedBids = [{...bidArrayAlt[0]}, {...bidArrayAlt[2]}, {...bidArrayAlt[3]}, {...bidArrayAlt[1]}].map(bid => {
|
|
639
|
-
addBidResponseHook(bidResponseCallback, 'test
|
|
639
|
+
addBidResponseHook(bidResponseCallback, 'test.div', {...bid});
|
|
640
640
|
|
|
641
641
|
return bidResult;
|
|
642
642
|
});
|
|
@@ -662,7 +662,7 @@ describe('multibid adapter', function () {
|
|
|
662
662
|
config.setConfig({ multibid: [{bidder: 'bidderA', maxBids: 2, targetBiddercodePrefix: 'bidA'}] });
|
|
663
663
|
|
|
664
664
|
let modifiedBids = [{...bidArrayAlt[0]}, {...bidArrayAlt[2]}, {...bidArrayAlt[3]}, {...bidArrayAlt[1]}].map(bid => {
|
|
665
|
-
addBidResponseHook(bidResponseCallback, 'test
|
|
665
|
+
addBidResponseHook(bidResponseCallback, 'test.div', {...bid});
|
|
666
666
|
|
|
667
667
|
return bidResult;
|
|
668
668
|
});
|
|
@@ -8,29 +8,46 @@ import { spec } from 'modules/nativoBidAdapter.js'
|
|
|
8
8
|
describe('nativoBidAdapterTests', function () {
|
|
9
9
|
describe('isBidRequestValid', function () {
|
|
10
10
|
let bid = {
|
|
11
|
-
bidder: 'nativo'
|
|
12
|
-
params: {
|
|
13
|
-
placementId: '10433394',
|
|
14
|
-
},
|
|
15
|
-
adUnitCode: 'adunit-code',
|
|
16
|
-
sizes: [
|
|
17
|
-
[300, 250],
|
|
18
|
-
[300, 600],
|
|
19
|
-
],
|
|
20
|
-
bidId: '27b02036ccfa6e',
|
|
21
|
-
bidderRequestId: '1372cd8bd8d6a8',
|
|
22
|
-
auctionId: 'cfc467e4-2707-48da-becb-bcaab0b2c114',
|
|
11
|
+
bidder: 'nativo'
|
|
23
12
|
}
|
|
24
13
|
|
|
25
|
-
it('should return true
|
|
14
|
+
it('should return true if no params found', function () {
|
|
15
|
+
expect(spec.isBidRequestValid(bid)).to.equal(true)
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('should return true for valid placementId value', function () {
|
|
19
|
+
bid.params = {
|
|
20
|
+
placementId: '10433394',
|
|
21
|
+
}
|
|
22
|
+
expect(spec.isBidRequestValid(bid)).to.equal(true)
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('should return true for valid placementId value', function () {
|
|
26
|
+
bid.params = {
|
|
27
|
+
placementId: 10433394,
|
|
28
|
+
}
|
|
29
|
+
expect(spec.isBidRequestValid(bid)).to.equal(true)
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
it('should return false for invalid placementId value', function () {
|
|
33
|
+
bid.params = {
|
|
34
|
+
placementId: true,
|
|
35
|
+
}
|
|
36
|
+
expect(spec.isBidRequestValid(bid)).to.equal(false)
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
it('should return true for valid placementId value', function () {
|
|
40
|
+
bid.params = {
|
|
41
|
+
url: 'www.test.com',
|
|
42
|
+
}
|
|
26
43
|
expect(spec.isBidRequestValid(bid)).to.equal(true)
|
|
27
44
|
})
|
|
28
45
|
|
|
29
|
-
it('should return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
expect(spec.isBidRequestValid(
|
|
46
|
+
it('should return false for invalid placementId value', function () {
|
|
47
|
+
bid.params = {
|
|
48
|
+
url: 4567890,
|
|
49
|
+
}
|
|
50
|
+
expect(spec.isBidRequestValid(bid)).to.equal(false)
|
|
34
51
|
})
|
|
35
52
|
})
|
|
36
53
|
|
|
@@ -119,7 +119,7 @@ describe('OguryBidAdapter', function () {
|
|
|
119
119
|
};
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
it('should return
|
|
122
|
+
it('should return syncs array with two elements of type image', () => {
|
|
123
123
|
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
124
124
|
|
|
125
125
|
expect(userSyncs).to.have.lengthOf(2);
|
|
@@ -129,7 +129,7 @@ describe('OguryBidAdapter', function () {
|
|
|
129
129
|
expect(userSyncs[1].url).to.contain('https://ms-cookie-sync.presage.io/ttd/init-sync');
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
-
it('should set the
|
|
132
|
+
it('should set the source as query param', () => {
|
|
133
133
|
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
134
134
|
expect(userSyncs[0].url).to.contain('source=prebid');
|
|
135
135
|
expect(userSyncs[1].url).to.contain('source=prebid');
|
|
@@ -146,7 +146,7 @@ describe('OguryBidAdapter', function () {
|
|
|
146
146
|
expect(spec.getUserSyncs(syncOptions, [], gdprConsent)).to.have.lengthOf(0);
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
it('should return
|
|
149
|
+
it('should return syncs array with two elements of type image when consentString is undefined', () => {
|
|
150
150
|
gdprConsent = {
|
|
151
151
|
gdprApplies: true,
|
|
152
152
|
consentString: undefined
|
|
@@ -160,7 +160,7 @@ describe('OguryBidAdapter', function () {
|
|
|
160
160
|
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
161
161
|
});
|
|
162
162
|
|
|
163
|
-
it('should return
|
|
163
|
+
it('should return syncs array with two elements of type image when consentString is null', () => {
|
|
164
164
|
gdprConsent = {
|
|
165
165
|
gdprApplies: true,
|
|
166
166
|
consentString: null
|
|
@@ -174,7 +174,7 @@ describe('OguryBidAdapter', function () {
|
|
|
174
174
|
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
175
175
|
});
|
|
176
176
|
|
|
177
|
-
it('should return
|
|
177
|
+
it('should return syncs array with two elements of type image when gdprConsent is undefined', () => {
|
|
178
178
|
gdprConsent = undefined;
|
|
179
179
|
|
|
180
180
|
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
@@ -185,7 +185,7 @@ describe('OguryBidAdapter', function () {
|
|
|
185
185
|
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
186
186
|
});
|
|
187
187
|
|
|
188
|
-
it('should return
|
|
188
|
+
it('should return syncs array with two elements of type image when gdprConsent is null', () => {
|
|
189
189
|
gdprConsent = null;
|
|
190
190
|
|
|
191
191
|
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
@@ -196,7 +196,7 @@ describe('OguryBidAdapter', function () {
|
|
|
196
196
|
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
197
197
|
});
|
|
198
198
|
|
|
199
|
-
it('should return
|
|
199
|
+
it('should return syncs array with two elements of type image when gdprConsent is null and gdprApplies is false', () => {
|
|
200
200
|
gdprConsent = {
|
|
201
201
|
gdprApplies: false,
|
|
202
202
|
consentString: null
|
|
@@ -210,7 +210,7 @@ describe('OguryBidAdapter', function () {
|
|
|
210
210
|
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
211
211
|
});
|
|
212
212
|
|
|
213
|
-
it('should return
|
|
213
|
+
it('should return syncs array with two elements of type image when gdprConsent is empty string and gdprApplies is false', () => {
|
|
214
214
|
gdprConsent = {
|
|
215
215
|
gdprApplies: false,
|
|
216
216
|
consentString: ''
|
|
@@ -240,7 +240,8 @@ describe('OguryBidAdapter', function () {
|
|
|
240
240
|
w: 300,
|
|
241
241
|
h: 250
|
|
242
242
|
}]
|
|
243
|
-
}
|
|
243
|
+
},
|
|
244
|
+
ext: bidRequests[0].params
|
|
244
245
|
}, {
|
|
245
246
|
id: bidRequests[1].bidId,
|
|
246
247
|
tagid: bidRequests[1].params.adUnitId,
|
|
@@ -250,7 +251,8 @@ describe('OguryBidAdapter', function () {
|
|
|
250
251
|
w: 600,
|
|
251
252
|
h: 500
|
|
252
253
|
}]
|
|
253
|
-
}
|
|
254
|
+
},
|
|
255
|
+
ext: bidRequests[1].params
|
|
254
256
|
}],
|
|
255
257
|
regs: {
|
|
256
258
|
ext: {
|
|
@@ -549,7 +551,7 @@ describe('OguryBidAdapter', function () {
|
|
|
549
551
|
xhr.restore()
|
|
550
552
|
})
|
|
551
553
|
|
|
552
|
-
it('should send
|
|
554
|
+
it('should send on bid timeout notification', function() {
|
|
553
555
|
const bid = {
|
|
554
556
|
ad: '<img style="width: 300px; height: 250px;" src="https://assets.afcdn.com/recipe/20190529/93153_w1024h768c1cx2220cy1728cxt0cyt0cxb4441cyb3456.jpg" alt="cookies" />',
|
|
555
557
|
cpm: 3
|
|
@@ -1102,6 +1102,11 @@ describe('OpenxAdapter', function () {
|
|
|
1102
1102
|
mwOpenLinkId: '1111-mwopenlinkid',
|
|
1103
1103
|
dapId: '1111-dapId',
|
|
1104
1104
|
amxId: '1111-amxid',
|
|
1105
|
+
kpuid: '1111-kpuid',
|
|
1106
|
+
publinkId: '1111-publinkid',
|
|
1107
|
+
naveggId: '1111-naveggid',
|
|
1108
|
+
imuid: '1111-imuid',
|
|
1109
|
+
adtelligentId: '1111-adtelligentid'
|
|
1105
1110
|
};
|
|
1106
1111
|
|
|
1107
1112
|
// generates the same set of tests for each id provider
|
|
@@ -1602,32 +1607,6 @@ describe('OpenxAdapter', function () {
|
|
|
1602
1607
|
scsm: 'dmp3/5:foo2|bar2,dmp4:baz2'
|
|
1603
1608
|
},
|
|
1604
1609
|
},
|
|
1605
|
-
{
|
|
1606
|
-
name: 'should not send duplicate proprietary segment data from first party config ',
|
|
1607
|
-
config: {
|
|
1608
|
-
ortb2: {
|
|
1609
|
-
user: {
|
|
1610
|
-
data: [
|
|
1611
|
-
{name: 'dmp1', ext: {segtax: 4}, segment: [{id: 'foo'}, {id: 'bar'}, {id: 'foo'}]},
|
|
1612
|
-
{name: 'dmp1', ext: {segtax: 4}, segment: [{id: 'foo'}, {id: 'bar'}]},
|
|
1613
|
-
]
|
|
1614
|
-
},
|
|
1615
|
-
site: {
|
|
1616
|
-
content: {
|
|
1617
|
-
data: [
|
|
1618
|
-
{name: 'dmp1', ext: {segtax: 4}, segment: [{id: 'foo'}, {id: 'bar'}]},
|
|
1619
|
-
{name: 'dmp3', ext: {segtax: 5}, segment: [{id: 'foo2'}, {id: 'foo2'}, {id: 'bar2'}]},
|
|
1620
|
-
{name: 'dmp3', ext: {segtax: 5}, segment: [{id: 'foo2'}, {id: 'bar2'}]},
|
|
1621
|
-
]
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
},
|
|
1626
|
-
expect: {
|
|
1627
|
-
sm: 'dmp1/4:foo|bar',
|
|
1628
|
-
scsm: 'dmp1/4:foo|bar,dmp3/5:foo2|bar2'
|
|
1629
|
-
},
|
|
1630
|
-
},
|
|
1631
1610
|
{
|
|
1632
1611
|
name: 'should combine same provider segment data from ortb2.user.data',
|
|
1633
1612
|
config: {
|
|
@@ -369,7 +369,7 @@ describe('Opera Ads Bid Adapter', function () {
|
|
|
369
369
|
requestData = JSON.parse(reqs[0].data);
|
|
370
370
|
}).to.not.throw();
|
|
371
371
|
|
|
372
|
-
expect(requestData.user.
|
|
372
|
+
expect(requestData.user.buyeruid).to.equal(bidRequests[0].userId.sharedid.id);
|
|
373
373
|
});
|
|
374
374
|
|
|
375
375
|
it('pubcid should be used when sharedid is empty', function () {
|
|
@@ -406,7 +406,7 @@ describe('Opera Ads Bid Adapter', function () {
|
|
|
406
406
|
requestData = JSON.parse(reqs[0].data);
|
|
407
407
|
}).to.not.throw();
|
|
408
408
|
|
|
409
|
-
expect(requestData.user.
|
|
409
|
+
expect(requestData.user.buyeruid).to.equal(bidRequests[0].userId.pubcid);
|
|
410
410
|
});
|
|
411
411
|
|
|
412
412
|
it('random uid will be generate when userId is empty', function () {
|
|
@@ -433,7 +433,7 @@ describe('Opera Ads Bid Adapter', function () {
|
|
|
433
433
|
requestData = JSON.parse(reqs[0].data);
|
|
434
434
|
}).to.not.throw();
|
|
435
435
|
|
|
436
|
-
expect(requestData.user.
|
|
436
|
+
expect(requestData.user.buyeruid).to.not.be.empty;
|
|
437
437
|
})
|
|
438
438
|
});
|
|
439
439
|
|
|
@@ -679,9 +679,41 @@ describe('Opera Ads Bid Adapter', function () {
|
|
|
679
679
|
});
|
|
680
680
|
});
|
|
681
681
|
|
|
682
|
-
describe('Test getUserSyncs', function () {
|
|
683
|
-
it('getUserSyncs should return empty array', function () {
|
|
684
|
-
|
|
682
|
+
describe('Test getUserSyncs with both iframe and pixel disabled', function () {
|
|
683
|
+
it('getUserSyncs should return an empty array', function () {
|
|
684
|
+
const syncOptions = {};
|
|
685
|
+
expect(spec.getUserSyncs(syncOptions)).to.be.an('array').that.is.empty;
|
|
686
|
+
});
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
describe('Test getUserSyncs with iframe enabled', function () {
|
|
690
|
+
it('getUserSyncs should return array', function () {
|
|
691
|
+
const syncOptions = {
|
|
692
|
+
iframeEnabled: true
|
|
693
|
+
}
|
|
694
|
+
const userSyncPixels = spec.getUserSyncs(syncOptions)
|
|
695
|
+
expect(userSyncPixels).to.have.lengthOf(1);
|
|
696
|
+
expect(userSyncPixels[0].url).to.equal('https://s.adx.opera.com/usersync/page')
|
|
697
|
+
});
|
|
698
|
+
});
|
|
699
|
+
|
|
700
|
+
describe('Test getUserSyncs with pixel enabled', function () {
|
|
701
|
+
it('getUserSyncs should return array', function () {
|
|
702
|
+
const serverResponse = {
|
|
703
|
+
body: {
|
|
704
|
+
'pixels': [
|
|
705
|
+
'https://b1.com/usersync',
|
|
706
|
+
'https://b2.com/usersync'
|
|
707
|
+
]
|
|
708
|
+
}
|
|
709
|
+
};
|
|
710
|
+
const syncOptions = {
|
|
711
|
+
pixelEnabled: true
|
|
712
|
+
}
|
|
713
|
+
const userSyncPixels = spec.getUserSyncs(syncOptions, [serverResponse])
|
|
714
|
+
expect(userSyncPixels).to.have.lengthOf(2);
|
|
715
|
+
expect(userSyncPixels[0].url).to.equal('https://b1.com/usersync')
|
|
716
|
+
expect(userSyncPixels[1].url).to.equal('https://b2.com/usersync')
|
|
685
717
|
});
|
|
686
718
|
});
|
|
687
719
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {expect} from 'chai';
|
|
2
|
+
import {spec} from 'modules/otmBidAdapter';
|
|
3
|
+
|
|
4
|
+
describe('otmBidAdapter', function () {
|
|
5
|
+
it('validate_pub_params', function () {
|
|
6
|
+
expect(spec.isBidRequestValid({
|
|
7
|
+
bidder: 'otm',
|
|
8
|
+
params: {
|
|
9
|
+
tid: '123',
|
|
10
|
+
bidfloor: 20
|
|
11
|
+
}
|
|
12
|
+
})).to.equal(true);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('validate_generated_params', function () {
|
|
16
|
+
let bidRequestData = [{
|
|
17
|
+
bidId: 'bid1234',
|
|
18
|
+
bidder: 'otm',
|
|
19
|
+
params: {
|
|
20
|
+
tid: '123',
|
|
21
|
+
bidfloor: 20
|
|
22
|
+
},
|
|
23
|
+
sizes: [[240, 400]]
|
|
24
|
+
}];
|
|
25
|
+
|
|
26
|
+
let request = spec.buildRequests(bidRequestData);
|
|
27
|
+
let req_data = request[0].data;
|
|
28
|
+
|
|
29
|
+
expect(req_data.bidid).to.equal('bid1234');
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('validate_response_params', function () {
|
|
33
|
+
let bidRequestData = {
|
|
34
|
+
data: {
|
|
35
|
+
bidId: 'bid1234'
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
let serverResponse = {
|
|
40
|
+
body: [
|
|
41
|
+
{
|
|
42
|
+
'auctionid': '3c6f8e22-541b-485c-9214-e974d9fb1b6f',
|
|
43
|
+
'cpm': 847.097,
|
|
44
|
+
'ad': '<html><body>test html</body></html>',
|
|
45
|
+
'w': 240,
|
|
46
|
+
'h': 400,
|
|
47
|
+
'currency': 'RUB',
|
|
48
|
+
'ttl': 300,
|
|
49
|
+
'creativeid': '1_7869053',
|
|
50
|
+
'bidid': '101f211def7c99',
|
|
51
|
+
'transactionid': 'transaction_id_1'
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
let bids = spec.interpretResponse(serverResponse, bidRequestData);
|
|
57
|
+
expect(bids).to.have.lengthOf(1);
|
|
58
|
+
let bid = bids[0];
|
|
59
|
+
expect(bid.cpm).to.equal(847.097);
|
|
60
|
+
expect(bid.currency).to.equal('RUB');
|
|
61
|
+
expect(bid.width).to.equal(240);
|
|
62
|
+
expect(bid.height).to.equal(400);
|
|
63
|
+
expect(bid.netRevenue).to.equal(true);
|
|
64
|
+
expect(bid.requestId).to.equal('101f211def7c99');
|
|
65
|
+
expect(bid.ad).to.equal('<html><body>test html</body></html>');
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -2,6 +2,7 @@ import {expect} from 'chai';
|
|
|
2
2
|
import {spec} from 'modules/outbrainBidAdapter.js';
|
|
3
3
|
import {config} from 'src/config.js';
|
|
4
4
|
import {server} from 'test/mocks/xhr';
|
|
5
|
+
import { createEidsArray } from 'modules/userId/eids.js';
|
|
5
6
|
|
|
6
7
|
describe('Outbrain Adapter', function () {
|
|
7
8
|
describe('Bid request and response', function () {
|
|
@@ -344,6 +345,23 @@ describe('Outbrain Adapter', function () {
|
|
|
344
345
|
|
|
345
346
|
config.resetConfig()
|
|
346
347
|
});
|
|
348
|
+
|
|
349
|
+
it('should pass extended ids', function () {
|
|
350
|
+
let bidRequest = {
|
|
351
|
+
bidId: 'bidId',
|
|
352
|
+
params: {},
|
|
353
|
+
userIdAsEids: createEidsArray({
|
|
354
|
+
idl_env: 'id-value',
|
|
355
|
+
}),
|
|
356
|
+
...commonBidRequest,
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
let res = spec.buildRequests([bidRequest], commonBidderRequest);
|
|
360
|
+
const resData = JSON.parse(res.data)
|
|
361
|
+
expect(resData.user.ext.eids).to.deep.equal([
|
|
362
|
+
{source: 'liveramp.com', uids: [{id: 'id-value', atype: 3}]}
|
|
363
|
+
]);
|
|
364
|
+
});
|
|
347
365
|
})
|
|
348
366
|
|
|
349
367
|
describe('interpretResponse', function () {
|