prebid.js 7.2.0 → 7.5.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/.circleci/config.yml +11 -6
- package/.github/dependabot.yml +6 -0
- package/.github/workflows/issue_tracker.yml +5 -0
- package/.github/workflows/release-drafter.yml +6 -0
- package/README.md +35 -0
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/adotBidAdapter.js +1 -1
- package/dist/adpod.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/audiencerunBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/cpexIdSystem.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/debugging.js +1 -1
- package/dist/dianomiBidAdapter.js +1 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -0
- package/dist/fpdModule.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hadronIdSystem.js +1 -1
- package/dist/hadronRtdProvider.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -0
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/nativoBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +137 -131
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -0
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- package/dist/pubCommonId.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -0
- package/dist/sizeMappingV2.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/tncIdSystem.js +1 -0
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/ventesBidAdapter.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vrtcalBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldlabBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/yieldoneBidAdapter.js +1 -1
- package/governance.md +5 -11
- package/gulpHelpers.js +1 -1
- package/gulpfile.js +1 -1
- package/karma.conf.maker.js +3 -1
- package/modules/.submodules.json +1 -0
- package/modules/33acrossBidAdapter.js +5 -1
- package/modules/adkernelBidAdapter.js +2 -1
- package/modules/adotBidAdapter.js +3 -3
- package/modules/adqueryBidAdapter.js +5 -1
- package/modules/appnexusBidAdapter.js +3 -3
- package/modules/cpexIdSystem.js +7 -8
- package/modules/criteoBidAdapter.js +7 -1
- package/modules/cwireBidAdapter.md +1 -1
- package/modules/debugging/bidInterceptor.js +1 -1
- package/modules/debugging/index.js +2 -1
- package/modules/dianomiBidAdapter.js +369 -0
- package/modules/dianomiBidAdapter.md +73 -0
- package/modules/finativeBidAdapter.js +235 -0
- package/modules/finativeBidAdapter.md +45 -0
- package/modules/fpdModule/index.js +6 -5
- package/modules/gdprEnforcement.js +8 -14
- package/modules/gumgumBidAdapter.js +2 -0
- package/modules/gumgumBidAdapter.md +19 -1
- package/modules/hadronAnalyticsAdapter.md +5 -5
- package/modules/hadronIdSystem.js +18 -5
- package/modules/hadronIdSystem.md +15 -11
- package/modules/hadronRtdProvider.js +14 -1
- package/modules/hadronRtdProvider.md +17 -13
- package/modules/insticatorBidAdapter.js +9 -0
- package/modules/ixBidAdapter.js +457 -57
- package/modules/ixBidAdapter.md +95 -5
- package/modules/kargoAnalyticsAdapter.js +88 -6
- package/modules/kargoAnalyticsAdapter.md +33 -0
- package/modules/kargoBidAdapter.js +1 -2
- package/modules/lassoBidAdapter.js +133 -0
- package/modules/lassoBidAdapter.md +29 -0
- package/modules/medianetBidAdapter.js +9 -5
- package/modules/missenaBidAdapter.js +20 -2
- package/modules/nativoBidAdapter.js +19 -7
- package/modules/openxBidAdapter.md +3 -1
- package/modules/openxOrtbBidAdapter.js +349 -0
- package/modules/openxOrtbBidAdapter.md +105 -0
- package/modules/pubCommonId.js +1 -2
- package/modules/readpeakBidAdapter.js +15 -6
- package/modules/relaidoBidAdapter.js +19 -4
- package/modules/riseBidAdapter.js +1 -0
- package/modules/seedtagBidAdapter.js +33 -1
- package/modules/sharedIdSystem.js +11 -5
- package/modules/sharethroughBidAdapter.js +9 -24
- package/modules/shinezBidAdapter.js +435 -0
- package/modules/shinezBidAdapter.md +76 -0
- package/modules/sonobiBidAdapter.js +28 -9
- package/modules/sovrnBidAdapter.js +16 -10
- package/modules/taboolaBidAdapter.js +1 -1
- package/modules/taboolaBidAdapter.md +3 -3
- package/modules/tncIdSystem.js +63 -0
- package/modules/tncIdSystem.md +33 -0
- package/modules/userId/eids.js +12 -0
- package/modules/userId/eids.md +7 -0
- package/modules/userId/userId.md +17 -0
- package/modules/ventesBidAdapter.js +1 -1
- package/modules/ventesBidAdapter.md +1 -1
- package/modules/vrtcalBidAdapter.js +35 -0
- package/modules/yieldlabBidAdapter.js +4 -0
- package/modules/yieldmoBidAdapter.js +20 -2
- package/modules/yieldoneBidAdapter.js +12 -1
- package/package.json +1 -1
- package/plugins/pbjsGlobals.js +2 -1
- package/src/adloader.js +1 -0
- package/src/prebid.js +4 -1
- package/src/storageManager.js +4 -5
- package/test/spec/modules/33acrossBidAdapter_spec.js +39 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
- package/test/spec/modules/cpexIdSystem_spec.js +5 -5
- package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
- package/test/spec/modules/debugging_mod_spec.js +7 -0
- package/test/spec/modules/dianomiBidAdapter_spec.js +1223 -0
- package/test/spec/modules/eids_spec.js +26 -1
- package/test/spec/modules/finativeBidAdapter_spec.js +186 -0
- package/test/spec/modules/fpdModule_spec.js +28 -1
- package/test/spec/modules/gdprEnforcement_spec.js +53 -100
- package/test/spec/modules/gumgumBidAdapter_spec.js +5 -0
- package/test/spec/modules/hadronIdSystem_spec.js +2 -2
- package/test/spec/modules/insticatorBidAdapter_spec.js +22 -1
- package/test/spec/modules/ixBidAdapter_spec.js +429 -10
- package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
- package/test/spec/modules/kargoBidAdapter_spec.js +1 -0
- package/test/spec/modules/lassoBidAdapter_spec.js +177 -0
- package/test/spec/modules/medianetBidAdapter_spec.js +24 -1
- package/test/spec/modules/missenaBidAdapter_spec.js +36 -14
- package/test/spec/modules/nativoBidAdapter_spec.js +67 -17
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +1303 -0
- package/test/spec/modules/readpeakBidAdapter_spec.js +1 -0
- package/test/spec/modules/relaidoBidAdapter_spec.js +29 -2
- package/test/spec/modules/riseBidAdapter_spec.js +3 -0
- package/test/spec/modules/seedtagBidAdapter_spec.js +4 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
- package/test/spec/modules/shinezBidAdapter_spec.js +479 -0
- package/test/spec/modules/sonobiBidAdapter_spec.js +38 -23
- package/test/spec/modules/sovrnBidAdapter_spec.js +39 -5
- package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
- package/test/spec/modules/tncIdSystem_spec.js +109 -0
- package/test/spec/modules/userId_spec.js +6 -3
- package/test/spec/modules/ventesBidAdapter_spec.js +2 -2
- package/test/spec/modules/vrtcalBidAdapter_spec.js +17 -0
- package/test/spec/modules/yieldlabBidAdapter_spec.js +4 -0
- package/test/spec/modules/yieldmoBidAdapter_spec.js +15 -2
- package/test/spec/modules/yieldoneBidAdapter_spec.js +43 -2
- package/test/spec/unit/pbjs_api_spec.js +23 -0
- package/webpack.conf.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expect } from 'chai'
|
|
2
2
|
import { spec, _getPlatform } from 'modules/sonobiBidAdapter.js'
|
|
3
3
|
import { newBidder } from 'src/adapters/bidderFactory.js'
|
|
4
|
-
import {userSync} from '../../../src/userSync.js';
|
|
4
|
+
import { userSync } from '../../../src/userSync.js';
|
|
5
5
|
import { config } from 'src/config.js';
|
|
6
6
|
import * as utils from '../../../src/utils.js';
|
|
7
7
|
|
|
@@ -239,13 +239,13 @@ describe('SonobiBidAdapter', function () {
|
|
|
239
239
|
|
|
240
240
|
describe('.buildRequests', function () {
|
|
241
241
|
let sandbox;
|
|
242
|
-
beforeEach(function() {
|
|
242
|
+
beforeEach(function () {
|
|
243
243
|
sinon.stub(userSync, 'canBidderRegisterSync');
|
|
244
244
|
sinon.stub(utils, 'getGptSlotInfoForAdUnitCode')
|
|
245
|
-
.onFirstCall().returns({gptSlot: '/123123/gpt_publisher/adunit-code-3', divId: 'adunit-code-3-div-id'});
|
|
245
|
+
.onFirstCall().returns({ gptSlot: '/123123/gpt_publisher/adunit-code-3', divId: 'adunit-code-3-div-id' });
|
|
246
246
|
sandbox = sinon.createSandbox();
|
|
247
247
|
});
|
|
248
|
-
afterEach(function() {
|
|
248
|
+
afterEach(function () {
|
|
249
249
|
userSync.canBidderRegisterSync.restore();
|
|
250
250
|
utils.getGptSlotInfoForAdUnitCode.restore();
|
|
251
251
|
sandbox.restore();
|
|
@@ -284,6 +284,11 @@ describe('SonobiBidAdapter', function () {
|
|
|
284
284
|
pbadslot: '/123123/gpt_publisher/adunit-code-1'
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
+
},
|
|
288
|
+
mediaTypes: {
|
|
289
|
+
video: {
|
|
290
|
+
context: 'outstream'
|
|
291
|
+
}
|
|
287
292
|
}
|
|
288
293
|
},
|
|
289
294
|
{
|
|
@@ -296,11 +301,16 @@ describe('SonobiBidAdapter', function () {
|
|
|
296
301
|
'adUnitCode': 'adunit-code-3',
|
|
297
302
|
'sizes': [[120, 600], [300, 600], [160, 600]],
|
|
298
303
|
'bidId': '30b31c1838de1d',
|
|
299
|
-
'getFloor': ({currency, mediaType, size}) => {
|
|
304
|
+
'getFloor': ({ currency, mediaType, size }) => {
|
|
300
305
|
return {
|
|
301
306
|
currency: 'USD',
|
|
302
307
|
floor: 0.42
|
|
303
308
|
}
|
|
309
|
+
},
|
|
310
|
+
mediaTypes: {
|
|
311
|
+
banner: {
|
|
312
|
+
sizes: [[300, 250], [300, 600]]
|
|
313
|
+
}
|
|
304
314
|
}
|
|
305
315
|
},
|
|
306
316
|
{
|
|
@@ -313,12 +323,17 @@ describe('SonobiBidAdapter', function () {
|
|
|
313
323
|
'adUnitCode': 'adunit-code-2',
|
|
314
324
|
'sizes': [[120, 600], [300, 600], [160, 600]],
|
|
315
325
|
'bidId': '30b31c1838de1e',
|
|
326
|
+
mediaTypes: {
|
|
327
|
+
banner: {
|
|
328
|
+
sizes: [[300, 250], [300, 600]]
|
|
329
|
+
}
|
|
330
|
+
}
|
|
316
331
|
}];
|
|
317
332
|
|
|
318
333
|
let keyMakerData = {
|
|
319
|
-
'30b31c1838de1f': '1a2b3c4d5e6f1a2b3c4d
|
|
320
|
-
'30b31c1838de1d': '1a2b3c4d5e6f1a2b3c4e|300x250,300x600|f=0.42
|
|
321
|
-
'/7780971/sparks_prebid_LB|30b31c1838de1e': '300x250,300x600|gpid=/7780971/sparks_prebid_LB',
|
|
334
|
+
'30b31c1838de1f': '1a2b3c4d5e6f1a2b3c4d||f=1.25,gpid=/123123/gpt_publisher/adunit-code-1,c=v,',
|
|
335
|
+
'30b31c1838de1d': '1a2b3c4d5e6f1a2b3c4e|300x250,300x600|f=0.42,gpid=/123123/gpt_publisher/adunit-code-3,c=d,',
|
|
336
|
+
'/7780971/sparks_prebid_LB|30b31c1838de1e': '300x250,300x600|gpid=/7780971/sparks_prebid_LB,c=d,',
|
|
322
337
|
};
|
|
323
338
|
|
|
324
339
|
let bidderRequests = {
|
|
@@ -336,7 +351,7 @@ describe('SonobiBidAdapter', function () {
|
|
|
336
351
|
uspConsent: 'someCCPAString'
|
|
337
352
|
};
|
|
338
353
|
|
|
339
|
-
it('should set fpd if there is any data in ortb2', function() {
|
|
354
|
+
it('should set fpd if there is any data in ortb2', function () {
|
|
340
355
|
const ortb2 = {
|
|
341
356
|
site: {
|
|
342
357
|
ext: {
|
|
@@ -360,14 +375,14 @@ describe('SonobiBidAdapter', function () {
|
|
|
360
375
|
});
|
|
361
376
|
|
|
362
377
|
it('should populate coppa as 1 if set in config', function () {
|
|
363
|
-
config.setConfig({coppa: true});
|
|
378
|
+
config.setConfig({ coppa: true });
|
|
364
379
|
const bidRequests = spec.buildRequests(bidRequest, bidderRequests);
|
|
365
380
|
|
|
366
381
|
expect(bidRequests.data.coppa).to.equal(1);
|
|
367
382
|
});
|
|
368
383
|
|
|
369
384
|
it('should populate coppa as 0 if set in config', function () {
|
|
370
|
-
config.setConfig({coppa: false});
|
|
385
|
+
config.setConfig({ coppa: false });
|
|
371
386
|
const bidRequests = spec.buildRequests(bidRequest, bidderRequests);
|
|
372
387
|
|
|
373
388
|
expect(bidRequests.data.coppa).to.equal(0);
|
|
@@ -462,7 +477,7 @@ describe('SonobiBidAdapter', function () {
|
|
|
462
477
|
})
|
|
463
478
|
|
|
464
479
|
it('should return null if there is nothing to bid on', function () {
|
|
465
|
-
const bidRequests = spec.buildRequests([{params: {}}], bidderRequests)
|
|
480
|
+
const bidRequests = spec.buildRequests([{ params: {} }], bidderRequests)
|
|
466
481
|
expect(bidRequests).to.equal(null);
|
|
467
482
|
});
|
|
468
483
|
|
|
@@ -472,7 +487,7 @@ describe('SonobiBidAdapter', function () {
|
|
|
472
487
|
expect(bidRequests.data.ius).to.equal(0);
|
|
473
488
|
});
|
|
474
489
|
|
|
475
|
-
it('should set ius as 1 if Sonobi can drop iframe pixels', function() {
|
|
490
|
+
it('should set ius as 1 if Sonobi can drop iframe pixels', function () {
|
|
476
491
|
userSync.canBidderRegisterSync.returns(true);
|
|
477
492
|
const bidRequests = spec.buildRequests(bidRequest, bidderRequests);
|
|
478
493
|
expect(bidRequests.data.ius).to.equal(1);
|
|
@@ -525,14 +540,14 @@ describe('SonobiBidAdapter', function () {
|
|
|
525
540
|
});
|
|
526
541
|
|
|
527
542
|
it('should return a properly formatted request with userid as a JSON-encoded set of User ID results', function () {
|
|
528
|
-
bidRequest[0].userId = {'pubcid': 'abcd-efg-0101', 'tdid': 'td-abcd-efg-0101', 'id5id': {'uid': 'ID5-ZHMOrVeUVTUKgrZ-a2YGxeh5eS_pLzHCQGYOEAiTBQ', 'ext': {'linkType': 2}}};
|
|
529
|
-
bidRequest[1].userId = {'pubcid': 'abcd-efg-0101', 'tdid': 'td-abcd-efg-0101', 'id5id': {'uid': 'ID5-ZHMOrVeUVTUKgrZ-a2YGxeh5eS_pLzHCQGYOEAiTBQ', 'ext': {'linkType': 2}}};
|
|
543
|
+
bidRequest[0].userId = { 'pubcid': 'abcd-efg-0101', 'tdid': 'td-abcd-efg-0101', 'id5id': { 'uid': 'ID5-ZHMOrVeUVTUKgrZ-a2YGxeh5eS_pLzHCQGYOEAiTBQ', 'ext': { 'linkType': 2 } } };
|
|
544
|
+
bidRequest[1].userId = { 'pubcid': 'abcd-efg-0101', 'tdid': 'td-abcd-efg-0101', 'id5id': { 'uid': 'ID5-ZHMOrVeUVTUKgrZ-a2YGxeh5eS_pLzHCQGYOEAiTBQ', 'ext': { 'linkType': 2 } } };
|
|
530
545
|
const bidRequests = spec.buildRequests(bidRequest, bidderRequests);
|
|
531
546
|
expect(bidRequests.url).to.equal('https://apex.go.sonobi.com/trinity.json');
|
|
532
547
|
expect(bidRequests.method).to.equal('GET');
|
|
533
548
|
expect(bidRequests.data.ref).not.to.be.empty;
|
|
534
549
|
expect(bidRequests.data.s).not.to.be.empty;
|
|
535
|
-
expect(JSON.parse(bidRequests.data.userid)).to.eql({'pubcid': 'abcd-efg-0101', 'tdid': 'td-abcd-efg-0101', 'id5id': 'ID5-ZHMOrVeUVTUKgrZ-a2YGxeh5eS_pLzHCQGYOEAiTBQ'});
|
|
550
|
+
expect(JSON.parse(bidRequests.data.userid)).to.eql({ 'pubcid': 'abcd-efg-0101', 'tdid': 'td-abcd-efg-0101', 'id5id': 'ID5-ZHMOrVeUVTUKgrZ-a2YGxeh5eS_pLzHCQGYOEAiTBQ' });
|
|
536
551
|
});
|
|
537
552
|
|
|
538
553
|
it('should return a properly formatted request with userid omitted if there are no userIds', function () {
|
|
@@ -557,17 +572,17 @@ describe('SonobiBidAdapter', function () {
|
|
|
557
572
|
expect(bidRequests.data.userid).to.equal(undefined);
|
|
558
573
|
});
|
|
559
574
|
|
|
560
|
-
it('should return a properly formatted request with keywrods included as a csv of strings', function() {
|
|
575
|
+
it('should return a properly formatted request with keywrods included as a csv of strings', function () {
|
|
561
576
|
const bidRequests = spec.buildRequests(bidRequest, bidderRequests);
|
|
562
577
|
expect(bidRequests.data.kw).to.equal('sports,news,some_other_keyword');
|
|
563
578
|
});
|
|
564
579
|
|
|
565
|
-
it('should return a properly formatted request with us_privacy included', function() {
|
|
580
|
+
it('should return a properly formatted request with us_privacy included', function () {
|
|
566
581
|
const bidRequests = spec.buildRequests(bidRequest, bidderRequests);
|
|
567
582
|
expect(bidRequests.data.us_privacy).to.equal('someCCPAString');
|
|
568
583
|
});
|
|
569
584
|
|
|
570
|
-
it('should make a request to the url defined in the bidder param', function() {
|
|
585
|
+
it('should make a request to the url defined in the bidder param', function () {
|
|
571
586
|
const bRequest = [
|
|
572
587
|
{
|
|
573
588
|
...bidRequest[0],
|
|
@@ -755,7 +770,7 @@ describe('SonobiBidAdapter', function () {
|
|
|
755
770
|
'dealId': 'dozerkey',
|
|
756
771
|
'aid': 'force_1550072228_da1c5d030cb49150c5db8a2136175755',
|
|
757
772
|
'mediaType': 'video',
|
|
758
|
-
renderer: () => {},
|
|
773
|
+
renderer: () => { },
|
|
759
774
|
meta: {
|
|
760
775
|
advertiserDomains: ['sonobi.com']
|
|
761
776
|
}
|
|
@@ -828,13 +843,13 @@ describe('SonobiBidAdapter', function () {
|
|
|
828
843
|
})
|
|
829
844
|
describe('_getPlatform', function () {
|
|
830
845
|
it('should return mobile', function () {
|
|
831
|
-
expect(_getPlatform({innerWidth: 767})).to.equal('mobile')
|
|
846
|
+
expect(_getPlatform({ innerWidth: 767 })).to.equal('mobile')
|
|
832
847
|
})
|
|
833
848
|
it('should return tablet', function () {
|
|
834
|
-
expect(_getPlatform({innerWidth: 800})).to.equal('tablet')
|
|
849
|
+
expect(_getPlatform({ innerWidth: 800 })).to.equal('tablet')
|
|
835
850
|
})
|
|
836
851
|
it('should return desktop', function () {
|
|
837
|
-
expect(_getPlatform({innerWidth: 1000})).to.equal('desktop')
|
|
852
|
+
expect(_getPlatform({ innerWidth: 1000 })).to.equal('desktop')
|
|
838
853
|
})
|
|
839
854
|
})
|
|
840
855
|
})
|
|
@@ -95,9 +95,9 @@ describe('sovrnBidAdapter', function() {
|
|
|
95
95
|
expect(impression.banner.h).to.equal(1)
|
|
96
96
|
})
|
|
97
97
|
|
|
98
|
-
it('sets the proper video object', function() {
|
|
99
|
-
const width =
|
|
100
|
-
const height =
|
|
98
|
+
it('sets the proper video object with sizes defined', function() {
|
|
99
|
+
const width = 300
|
|
100
|
+
const height = 250
|
|
101
101
|
const mimes = ['video/mp4', 'application/javascript']
|
|
102
102
|
const protocols = [2, 5]
|
|
103
103
|
const minduration = 5
|
|
@@ -129,6 +129,42 @@ describe('sovrnBidAdapter', function() {
|
|
|
129
129
|
expect(impression.video.startdelay).to.equal(startdelay)
|
|
130
130
|
})
|
|
131
131
|
|
|
132
|
+
it('sets the proper video object wihtout sizes defined but video sizes defined', function() {
|
|
133
|
+
const width = 360
|
|
134
|
+
const height = 240
|
|
135
|
+
const mimes = ['video/mp4', 'application/javascript']
|
|
136
|
+
const protocols = [2, 5]
|
|
137
|
+
const minduration = 5
|
|
138
|
+
const maxduration = 60
|
|
139
|
+
const startdelay = 0
|
|
140
|
+
const modifiedBidRequest = baseBidRequest;
|
|
141
|
+
delete modifiedBidRequest.sizes;
|
|
142
|
+
const videoBidRequest = {
|
|
143
|
+
...modifiedBidRequest,
|
|
144
|
+
mediaTypes: {
|
|
145
|
+
video: {
|
|
146
|
+
mimes,
|
|
147
|
+
protocols,
|
|
148
|
+
playerSize: [[width, height], [360, 240]],
|
|
149
|
+
minduration,
|
|
150
|
+
maxduration,
|
|
151
|
+
startdelay
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const request = spec.buildRequests([videoBidRequest], baseBidderRequest)
|
|
156
|
+
const payload = JSON.parse(request.data)
|
|
157
|
+
const impression = payload.imp[0]
|
|
158
|
+
|
|
159
|
+
expect(impression.video.w).to.equal(width)
|
|
160
|
+
expect(impression.video.h).to.equal(height)
|
|
161
|
+
expect(impression.video.mimes).to.have.same.members(mimes)
|
|
162
|
+
expect(impression.video.protocols).to.have.same.members(protocols)
|
|
163
|
+
expect(impression.video.minduration).to.equal(minduration)
|
|
164
|
+
expect(impression.video.maxduration).to.equal(maxduration)
|
|
165
|
+
expect(impression.video.startdelay).to.equal(startdelay)
|
|
166
|
+
})
|
|
167
|
+
|
|
132
168
|
it('gets correct site info', function() {
|
|
133
169
|
expect(payload.site.page).to.equal('http://example.com/page.html')
|
|
134
170
|
expect(payload.site.domain).to.equal('example.com')
|
|
@@ -254,8 +290,6 @@ describe('sovrnBidAdapter', function() {
|
|
|
254
290
|
expect(secondEID.uids[0].id).to.equal('SOMESORTOFID')
|
|
255
291
|
expect(secondEID.uids[0].ext.rtiPartner).to.equal('TDID')
|
|
256
292
|
expect(secondEID.uids[0].atype).to.equal(1)
|
|
257
|
-
expect(ext.tpid[0].source).to.equal('criteo.com')
|
|
258
|
-
expect(ext.tpid[0].uid).to.equal('A_CRITEO_ID')
|
|
259
293
|
expect(ext.prebid_criteoid).to.equal('A_CRITEO_ID')
|
|
260
294
|
})
|
|
261
295
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { tncidSubModule } from 'modules/tncIdSystem';
|
|
2
|
+
|
|
3
|
+
const consentData = {
|
|
4
|
+
gdprApplies: true,
|
|
5
|
+
consentString: 'GDPR_CONSENT_STRING'
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
describe('TNCID tests', function () {
|
|
9
|
+
describe('name', () => {
|
|
10
|
+
it('should expose the name of the submodule', () => {
|
|
11
|
+
expect(tncidSubModule.name).to.equal('tncId');
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe('gvlid', () => {
|
|
16
|
+
it('should expose the vendor id', () => {
|
|
17
|
+
expect(tncidSubModule.gvlid).to.equal(750);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
describe('decode', () => {
|
|
22
|
+
it('should wrap the given value inside an object literal', () => {
|
|
23
|
+
expect(tncidSubModule.decode('TNCID_TEST_ID')).to.deep.equal({
|
|
24
|
+
tncid: 'TNCID_TEST_ID'
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
describe('getId', () => {
|
|
30
|
+
afterEach(function () {
|
|
31
|
+
Object.defineProperty(window, '__tnc', {value: undefined, configurable: true});
|
|
32
|
+
Object.defineProperty(window, '__tncPbjs', {value: undefined, configurable: true});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('Should NOT give TNCID if GDPR applies but consent string is missing', function () {
|
|
36
|
+
const res = tncidSubModule.getId({}, { gdprApplies: true });
|
|
37
|
+
expect(res).to.be.undefined;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('GDPR is OK and page has no TNC script on page, script goes in error, no TNCID is returned', function () {
|
|
41
|
+
const completeCallback = sinon.spy();
|
|
42
|
+
const {callback} = tncidSubModule.getId({}, consentData);
|
|
43
|
+
|
|
44
|
+
return callback(completeCallback).then(() => {
|
|
45
|
+
expect(completeCallback.calledOnce).to.be.true;
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('GDPR is OK and page has TNC script with ns: __tnc, present TNCID is returned', function () {
|
|
50
|
+
Object.defineProperty(window, '__tnc', {
|
|
51
|
+
value: {
|
|
52
|
+
ready: (readyFunc) => { readyFunc() },
|
|
53
|
+
on: (name, cb) => { cb() },
|
|
54
|
+
tncid: 'TNCID_TEST_ID_1',
|
|
55
|
+
providerId: 'TEST_PROVIDER_ID_1',
|
|
56
|
+
},
|
|
57
|
+
configurable: true
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const completeCallback = sinon.spy();
|
|
61
|
+
const {callback} = tncidSubModule.getId({}, { gdprApplies: false });
|
|
62
|
+
|
|
63
|
+
return callback(completeCallback).then(() => {
|
|
64
|
+
expect(completeCallback.calledOnceWithExactly('TNCID_TEST_ID_1')).to.be.true;
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('GDPR is OK and page has TNC script with ns: __tnc but not loaded, TNCID is assigned and returned', function () {
|
|
69
|
+
Object.defineProperty(window, '__tnc', {
|
|
70
|
+
value: {
|
|
71
|
+
ready: (readyFunc) => { readyFunc() },
|
|
72
|
+
on: (name, cb) => { cb() },
|
|
73
|
+
providerId: 'TEST_PROVIDER_ID_1',
|
|
74
|
+
},
|
|
75
|
+
configurable: true
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const completeCallback = sinon.spy();
|
|
79
|
+
const {callback} = tncidSubModule.getId({}, { gdprApplies: false });
|
|
80
|
+
|
|
81
|
+
return callback(completeCallback).then(() => {
|
|
82
|
+
expect(completeCallback.calledOnceWithExactly(undefined)).to.be.true;
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it('GDPR is OK and page has TNC script with ns: __tncPbjs, TNCID is returned', function () {
|
|
87
|
+
Object.defineProperty(window, '__tncPbjs', {
|
|
88
|
+
value: {
|
|
89
|
+
ready: (readyFunc) => { readyFunc() },
|
|
90
|
+
on: (name, cb) => {
|
|
91
|
+
window.__tncPbjs.tncid = 'TNCID_TEST_ID_2';
|
|
92
|
+
cb();
|
|
93
|
+
},
|
|
94
|
+
providerId: 'TEST_PROVIDER_ID_1',
|
|
95
|
+
options: {},
|
|
96
|
+
},
|
|
97
|
+
configurable: true,
|
|
98
|
+
writable: true
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const completeCallback = sinon.spy();
|
|
102
|
+
const {callback} = tncidSubModule.getId({params: {url: 'TEST_URL'}}, consentData);
|
|
103
|
+
|
|
104
|
+
return callback(completeCallback).then(() => {
|
|
105
|
+
expect(completeCallback.calledOnceWithExactly('TNCID_TEST_ID_2')).to.be.true;
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
});
|
|
@@ -38,6 +38,7 @@ import {pubProvidedIdSubmodule} from 'modules/pubProvidedIdSystem.js';
|
|
|
38
38
|
import {criteoIdSubmodule} from 'modules/criteoIdSystem.js';
|
|
39
39
|
import {mwOpenLinkIdSubModule} from 'modules/mwOpenLinkIdSystem.js';
|
|
40
40
|
import {tapadIdSubmodule} from 'modules/tapadIdSystem.js';
|
|
41
|
+
import {tncidSubModule} from 'modules/tncIdSystem.js';
|
|
41
42
|
import {getPrebidInternal} from 'src/utils.js';
|
|
42
43
|
import {uid2IdSubmodule} from 'modules/uid2IdSystem.js';
|
|
43
44
|
import {admixerIdSubmodule} from 'modules/admixerIdSystem.js';
|
|
@@ -784,9 +785,9 @@ describe('User ID', function () {
|
|
|
784
785
|
expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 1 submodules');
|
|
785
786
|
});
|
|
786
787
|
|
|
787
|
-
it('config with
|
|
788
|
+
it('config with 22 configurations should result in 22 submodules add', function () {
|
|
788
789
|
init(config);
|
|
789
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, liveIntentIdSubmodule, britepoolIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
790
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, liveIntentIdSubmodule, britepoolIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule, tncidSubModule]);
|
|
790
791
|
config.setConfig({
|
|
791
792
|
userSync: {
|
|
792
793
|
syncDelay: 0,
|
|
@@ -847,10 +848,12 @@ describe('User ID', function () {
|
|
|
847
848
|
}, {
|
|
848
849
|
name: 'qid',
|
|
849
850
|
storage: {name: 'qid', type: 'html5'}
|
|
851
|
+
}, {
|
|
852
|
+
name: 'tncId'
|
|
850
853
|
}]
|
|
851
854
|
}
|
|
852
855
|
});
|
|
853
|
-
expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for
|
|
856
|
+
expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 22 submodules');
|
|
854
857
|
});
|
|
855
858
|
|
|
856
859
|
it('config syncDelay updates module correctly', function () {
|
|
@@ -2,7 +2,7 @@ import { expect } from 'chai';
|
|
|
2
2
|
import * as utils from 'src/utils.js';
|
|
3
3
|
import { spec } from 'modules/ventesBidAdapter.js';
|
|
4
4
|
|
|
5
|
-
const BIDDER_URL = '
|
|
5
|
+
const BIDDER_URL = 'https://ad.ventesavenues.in/va/ad';
|
|
6
6
|
|
|
7
7
|
describe('Ventes Adapter', function () {
|
|
8
8
|
const examples = {
|
|
@@ -35,7 +35,7 @@ describe('Ventes Adapter', function () {
|
|
|
35
35
|
|
|
36
36
|
serverRequest_banner: {
|
|
37
37
|
method: 'POST',
|
|
38
|
-
url:
|
|
38
|
+
url: BIDDER_URL,
|
|
39
39
|
data: {
|
|
40
40
|
id: 'bid_request_id',
|
|
41
41
|
imp: [
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { expect } from 'chai'
|
|
2
2
|
import { spec } from 'modules/vrtcalBidAdapter'
|
|
3
3
|
import { newBidder } from 'src/adapters/bidderFactory'
|
|
4
|
+
import { config } from 'src/config.js';
|
|
4
5
|
|
|
5
6
|
describe('vrtcalBidAdapter', function () {
|
|
6
7
|
const adapter = newBidder(spec)
|
|
@@ -50,6 +51,22 @@ describe('vrtcalBidAdapter', function () {
|
|
|
50
51
|
request = spec.buildRequests(bidRequests);
|
|
51
52
|
expect(request[0].data).to.match(/"bidfloor":0.55/);
|
|
52
53
|
});
|
|
54
|
+
|
|
55
|
+
it('pass GDPR,CCPA, and COPPA indicators/consent strings with the request when present', function () {
|
|
56
|
+
bidRequests[0].gdprConsent = {consentString: 'gdpr-consent-string', gdprApplies: true};
|
|
57
|
+
bidRequests[0].uspConsent = 'ccpa-consent-string';
|
|
58
|
+
config.setConfig({ coppa: false });
|
|
59
|
+
|
|
60
|
+
request = spec.buildRequests(bidRequests);
|
|
61
|
+
expect(request[0].data).to.match(/"user":{"ext":{"consent":"gdpr-consent-string"}}/);
|
|
62
|
+
expect(request[0].data).to.match(/"regs":{"coppa":0,"ext":{"gdpr":1,"us_privacy":"ccpa-consent-string"}}/);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('pass bidder timeout/tmax with the request', function () {
|
|
66
|
+
config.setConfig({ bidderTimeout: 435 });
|
|
67
|
+
request = spec.buildRequests(bidRequests);
|
|
68
|
+
expect(request[0].data).to.match(/"tmax":435/);
|
|
69
|
+
});
|
|
53
70
|
});
|
|
54
71
|
|
|
55
72
|
describe('interpretResponse', function () {
|
|
@@ -214,6 +214,10 @@ describe('yieldlabBidAdapter', () => {
|
|
|
214
214
|
it('passes correct size to bid request', () => {
|
|
215
215
|
expect(request.url).to.include('728x90')
|
|
216
216
|
})
|
|
217
|
+
|
|
218
|
+
it('passes external id to bid request', () => {
|
|
219
|
+
expect(request.url).to.include('id=abc')
|
|
220
|
+
})
|
|
217
221
|
})
|
|
218
222
|
|
|
219
223
|
describe('iab_content handling', () => {
|
|
@@ -5,6 +5,7 @@ import * as utils from 'src/utils.js';
|
|
|
5
5
|
describe('YieldmoAdapter', function () {
|
|
6
6
|
const BANNER_ENDPOINT = 'https://ads.yieldmo.com/exchange/prebid';
|
|
7
7
|
const VIDEO_ENDPOINT = 'https://ads.yieldmo.com/exchange/prebidvideo';
|
|
8
|
+
const PB_COOKIE_ASSIST_SYNC_ENDPOINT = `https://ads.yieldmo.com/pbcas`;
|
|
8
9
|
|
|
9
10
|
const mockBannerBid = (rootParams = {}, params = {}) => ({
|
|
10
11
|
bidder: 'yieldmo',
|
|
@@ -606,8 +607,20 @@ describe('YieldmoAdapter', function () {
|
|
|
606
607
|
});
|
|
607
608
|
|
|
608
609
|
describe('getUserSync', function () {
|
|
609
|
-
|
|
610
|
-
|
|
610
|
+
const gdprFlag = `&gdpr=0`;
|
|
611
|
+
const usPrivacy = `us_privacy=`;
|
|
612
|
+
const gdprString = `&gdpr_consent=`;
|
|
613
|
+
const pbCookieAssistSyncUrl = `${PB_COOKIE_ASSIST_SYNC_ENDPOINT}?${usPrivacy}${gdprFlag}${gdprString}`;
|
|
614
|
+
it('should use type iframe when iframeEnabled', function() {
|
|
615
|
+
const syncs = spec.getUserSyncs({iframeEnabled: true});
|
|
616
|
+
expect(syncs).to.deep.equal([{type: 'iframe', url: pbCookieAssistSyncUrl + '&type=iframe'}])
|
|
617
|
+
});
|
|
618
|
+
it('should use type image when pixelEnabled', function() {
|
|
619
|
+
const syncs = spec.getUserSyncs({pixelEnabled: true});
|
|
620
|
+
expect(syncs).to.deep.equal([{type: 'image', url: pbCookieAssistSyncUrl + '&type=image'}])
|
|
621
|
+
});
|
|
622
|
+
it('should register no syncs', function () {
|
|
623
|
+
expect(spec.getUserSyncs({})).to.deep.equal([]);
|
|
611
624
|
});
|
|
612
625
|
});
|
|
613
626
|
});
|
|
@@ -399,6 +399,43 @@ describe('yieldoneBidAdapter', function() {
|
|
|
399
399
|
expect(request[0].data.imuid).to.equal('imuid_sample');
|
|
400
400
|
});
|
|
401
401
|
});
|
|
402
|
+
|
|
403
|
+
describe('DAC ID', function () {
|
|
404
|
+
it('dont send DAC ID if undefined', function () {
|
|
405
|
+
const bidRequests = [
|
|
406
|
+
{
|
|
407
|
+
params: {placementId: '0'},
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
params: {placementId: '1'},
|
|
411
|
+
userId: {},
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
params: {placementId: '2'},
|
|
415
|
+
userId: undefined,
|
|
416
|
+
},
|
|
417
|
+
];
|
|
418
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
419
|
+
expect(request[0].data).to.not.have.property('dac_id');
|
|
420
|
+
expect(request[1].data).to.not.have.property('dac_id');
|
|
421
|
+
expect(request[2].data).to.not.have.property('dac_id');
|
|
422
|
+
expect(request[0].data).to.not.have.property('fuuid');
|
|
423
|
+
expect(request[1].data).to.not.have.property('fuuid');
|
|
424
|
+
expect(request[2].data).to.not.have.property('fuuid');
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
it('should send DAC ID if available', function () {
|
|
428
|
+
const bidRequests = [
|
|
429
|
+
{
|
|
430
|
+
params: {placementId: '0'},
|
|
431
|
+
userId: {dacId: {id: 'dacId_sample'}},
|
|
432
|
+
},
|
|
433
|
+
];
|
|
434
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
435
|
+
expect(request[0].data.dac_id).to.equal('dacId_sample');
|
|
436
|
+
expect(request[0].data.fuuid).to.equal('dacId_sample');
|
|
437
|
+
});
|
|
438
|
+
});
|
|
402
439
|
});
|
|
403
440
|
|
|
404
441
|
describe('interpretResponse', function () {
|
|
@@ -413,7 +450,9 @@ describe('yieldoneBidAdapter', function() {
|
|
|
413
450
|
'cb': 12892917383,
|
|
414
451
|
'r': 'http%3A%2F%2Flocalhost%3A9876%2F%3Fid%3D74552836',
|
|
415
452
|
'uid': '23beaa6af6cdde',
|
|
416
|
-
't': 'i'
|
|
453
|
+
't': 'i',
|
|
454
|
+
'language': 'ja',
|
|
455
|
+
'screen_size': '1440x900'
|
|
417
456
|
}
|
|
418
457
|
}
|
|
419
458
|
];
|
|
@@ -486,7 +525,9 @@ describe('yieldoneBidAdapter', function() {
|
|
|
486
525
|
'cb': 12892917383,
|
|
487
526
|
'r': 'http%3A%2F%2Flocalhost%3A9876%2F%3Fid%3D74552836',
|
|
488
527
|
'uid': '23beaa6af6cdde',
|
|
489
|
-
't': 'i'
|
|
528
|
+
't': 'i',
|
|
529
|
+
'language': 'ja',
|
|
530
|
+
'screen_size': '1440x900'
|
|
490
531
|
}
|
|
491
532
|
}
|
|
492
533
|
];
|
|
@@ -1800,6 +1800,29 @@ describe('Unit: Prebid Module', function () {
|
|
|
1800
1800
|
.and.to.match(/[a-f0-9\-]{36}/i);
|
|
1801
1801
|
});
|
|
1802
1802
|
|
|
1803
|
+
it('should always set ortb2.ext.tid same as transactionId in adUnits', function () {
|
|
1804
|
+
$$PREBID_GLOBAL$$.requestBids({
|
|
1805
|
+
adUnits: [
|
|
1806
|
+
{
|
|
1807
|
+
code: 'test1',
|
|
1808
|
+
mediaTypes: { banner: { sizes: [] } },
|
|
1809
|
+
bids: []
|
|
1810
|
+
}, {
|
|
1811
|
+
code: 'test2',
|
|
1812
|
+
mediaTypes: { banner: { sizes: [] } },
|
|
1813
|
+
bids: []
|
|
1814
|
+
}
|
|
1815
|
+
]
|
|
1816
|
+
});
|
|
1817
|
+
|
|
1818
|
+
expect(auctionArgs.adUnits[0]).to.have.property('transactionId');
|
|
1819
|
+
expect(auctionArgs.adUnits[0]).to.have.property('ortb2Imp');
|
|
1820
|
+
expect(auctionArgs.adUnits[0].transactionId).to.equal(auctionArgs.adUnits[0].ortb2Imp.ext.tid);
|
|
1821
|
+
expect(auctionArgs.adUnits[1]).to.have.property('transactionId');
|
|
1822
|
+
expect(auctionArgs.adUnits[1]).to.have.property('ortb2Imp');
|
|
1823
|
+
expect(auctionArgs.adUnits[1].transactionId).to.equal(auctionArgs.adUnits[1].ortb2Imp.ext.tid);
|
|
1824
|
+
});
|
|
1825
|
+
|
|
1803
1826
|
it('should notify targeting of the latest auction for each adUnit', function () {
|
|
1804
1827
|
let latestStub = sinon.stub(targeting, 'setLatestAuctionForAdUnit');
|
|
1805
1828
|
let getAuctionStub = sinon.stub(auction, 'getAuctionId').returns(2);
|
package/webpack.conf.js
CHANGED
|
@@ -5,7 +5,7 @@ var webpack = require('webpack');
|
|
|
5
5
|
var helpers = require('./gulpHelpers.js');
|
|
6
6
|
var { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
7
7
|
var argv = require('yargs').argv;
|
|
8
|
-
const babelConfig = require('./babelConfig.js')({disableFeatures: helpers.getDisabledFeatures()});
|
|
8
|
+
const babelConfig = require('./babelConfig.js')({disableFeatures: helpers.getDisabledFeatures(), prebidDistUrlBase: argv.distUrlBase});
|
|
9
9
|
|
|
10
10
|
var plugins = [
|
|
11
11
|
new webpack.EnvironmentPlugin({'LiveConnectMode': null}),
|