prebid.js 7.13.0 → 7.14.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/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/adrelevantisBidAdapter.js +1 -1
- package/dist/adrinoBidAdapter.js +1 -1
- package/dist/adtelligentBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.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/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.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/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/discoveryBidAdapter.js +1 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fledgeForGpt.js +1 -0
- 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/id5IdSystem.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/invibesBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.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 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- 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/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +117 -114
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.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/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.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/spotxBidAdapter.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/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/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/xeBidAdapter.js +1 -0
- 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/modules/adrinoBidAdapter.js +1 -1
- package/modules/adtelligentBidAdapter.js +1 -1
- package/modules/bidwatchAnalyticsAdapter.js +10 -2
- package/modules/discoveryBidAdapter.js +467 -0
- package/modules/discoveryBidAdapter.md +60 -0
- package/modules/fledgeForGpt.js +52 -0
- package/modules/fledgeForGpt.md +60 -0
- package/modules/invibesBidAdapter.js +22 -11
- package/modules/kargoBidAdapter.js +7 -0
- package/modules/onetagBidAdapter.js +2 -3
- package/modules/openxOrtbBidAdapter.js +28 -2
- package/modules/outbrainBidAdapter.js +6 -3
- package/modules/spotxBidAdapter.js +10 -26
- package/modules/taboolaBidAdapter.js +2 -2
- package/modules/taboolaBidAdapter.md +10 -8
- package/modules/xeBidAdapter.js +206 -0
- package/modules/xeBidAdapter.md +54 -0
- package/modules/yieldlabBidAdapter.js +34 -3
- package/modules/yieldmoBidAdapter.js +16 -1
- package/package.json +2 -2
- package/src/adapterManager.js +8 -0
- package/src/adapters/bidderFactory.js +34 -4
- package/src/debugging.js +14 -6
- package/src/refererDetection.js +1 -12
- package/src/utils.js +10 -2
- package/test/spec/modules/adrinoBidAdapter_spec.js +10 -0
- package/test/spec/modules/bidwatchAnalyticsAdapter_spec.js +2 -0
- package/test/spec/modules/discoveryBidAdapter_spec.js +92 -0
- package/test/spec/modules/enrichmentFpdModule_spec.js +1 -2
- package/test/spec/modules/fledge_spec.js +37 -0
- package/test/spec/modules/fpdModule_spec.js +1 -2
- package/test/spec/modules/invibesBidAdapter_spec.js +31 -2
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +132 -18
- package/test/spec/modules/outbrainBidAdapter_spec.js +21 -0
- package/test/spec/modules/spotxBidAdapter_spec.js +30 -8
- package/test/spec/modules/taboolaBidAdapter_spec.js +77 -0
- package/test/spec/modules/xeBidAdapter_spec.js +450 -0
- package/test/spec/modules/yieldlabBidAdapter_spec.js +37 -0
- package/test/spec/modules/yieldmoBidAdapter_spec.js +43 -3
- package/test/spec/unit/core/adapterManager_spec.js +58 -0
- package/test/spec/unit/core/bidderFactory_spec.js +64 -0
|
@@ -206,7 +206,12 @@ describe('OpenxRtbAdapter', function () {
|
|
|
206
206
|
bidId: 'test-bid-id-1',
|
|
207
207
|
bidderRequestId: 'test-bid-request-1',
|
|
208
208
|
auctionId: 'test-auction-1',
|
|
209
|
-
transactionId: 'test-transactionId-1'
|
|
209
|
+
transactionId: 'test-transactionId-1',
|
|
210
|
+
ortb2Imp: {
|
|
211
|
+
ext: {
|
|
212
|
+
ae: 2
|
|
213
|
+
}
|
|
214
|
+
}
|
|
210
215
|
}, {
|
|
211
216
|
bidder: 'openx',
|
|
212
217
|
params: {
|
|
@@ -384,14 +389,16 @@ describe('OpenxRtbAdapter', function () {
|
|
|
384
389
|
});
|
|
385
390
|
|
|
386
391
|
it('ortb2.site should be merged in the request', function() {
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
+
const request = spec.buildRequests(bidRequests, {
|
|
393
|
+
...mockBidderRequest,
|
|
394
|
+
'ortb2': {
|
|
395
|
+
site: {
|
|
396
|
+
domain: 'page.example.com',
|
|
397
|
+
cat: ['IAB2'],
|
|
398
|
+
sectioncat: ['IAB2-2']
|
|
399
|
+
}
|
|
392
400
|
}
|
|
393
|
-
};
|
|
394
|
-
const request = spec.buildRequests(bidRequests, {refererInfo: {}, ortb2: ortb2});
|
|
401
|
+
});
|
|
395
402
|
let data = request[0].data;
|
|
396
403
|
expect(data.site.domain).to.equal('page.example.com');
|
|
397
404
|
expect(data.site.cat).to.deep.equal(['IAB2']);
|
|
@@ -399,12 +406,14 @@ describe('OpenxRtbAdapter', function () {
|
|
|
399
406
|
});
|
|
400
407
|
|
|
401
408
|
it('ortb2.user should be merged in the request', function() {
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
|
|
409
|
+
const request = spec.buildRequests(bidRequests, {
|
|
410
|
+
...mockBidderRequest,
|
|
411
|
+
'ortb2': {
|
|
412
|
+
user: {
|
|
413
|
+
yob: 1985
|
|
414
|
+
}
|
|
405
415
|
}
|
|
406
|
-
};
|
|
407
|
-
const request = spec.buildRequests(bidRequests, {refererInfo: {}, ortb2: ortb2});
|
|
416
|
+
});
|
|
408
417
|
let data = request[0].data;
|
|
409
418
|
expect(data.user.yob).to.equal(1985);
|
|
410
419
|
});
|
|
@@ -598,10 +607,6 @@ describe('OpenxRtbAdapter', function () {
|
|
|
598
607
|
}];
|
|
599
608
|
});
|
|
600
609
|
|
|
601
|
-
afterEach(function () {
|
|
602
|
-
config.getConfig.restore();
|
|
603
|
-
});
|
|
604
|
-
|
|
605
610
|
describe('us_privacy', function () {
|
|
606
611
|
beforeEach(function () {
|
|
607
612
|
bidderRequest = {
|
|
@@ -614,6 +619,10 @@ describe('OpenxRtbAdapter', function () {
|
|
|
614
619
|
});
|
|
615
620
|
});
|
|
616
621
|
|
|
622
|
+
afterEach(function () {
|
|
623
|
+
config.getConfig.restore();
|
|
624
|
+
});
|
|
625
|
+
|
|
617
626
|
it('should send a signal to specify that US Privacy applies to this request', function () {
|
|
618
627
|
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
619
628
|
expect(request[0].data.regs.ext.us_privacy).to.equal('1YYN');
|
|
@@ -651,6 +660,10 @@ describe('OpenxRtbAdapter', function () {
|
|
|
651
660
|
});
|
|
652
661
|
});
|
|
653
662
|
|
|
663
|
+
afterEach(function () {
|
|
664
|
+
config.getConfig.restore();
|
|
665
|
+
});
|
|
666
|
+
|
|
654
667
|
it('should send a signal to specify that GDPR applies to this request', function () {
|
|
655
668
|
bidderRequest.bids = bidRequests;
|
|
656
669
|
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
@@ -718,8 +731,10 @@ describe('OpenxRtbAdapter', function () {
|
|
|
718
731
|
|
|
719
732
|
const request = spec.buildRequests(bidRequestsWithMediaTypes, mockBidderRequest);
|
|
720
733
|
expect(request[0].data.regs.coppa).to.equal(1);
|
|
734
|
+
});
|
|
721
735
|
|
|
722
|
-
|
|
736
|
+
after(function () {
|
|
737
|
+
config.getConfig.restore()
|
|
723
738
|
});
|
|
724
739
|
});
|
|
725
740
|
|
|
@@ -890,6 +905,27 @@ describe('OpenxRtbAdapter', function () {
|
|
|
890
905
|
expect(request[0].data).to.not.have.any.keys('user');
|
|
891
906
|
});
|
|
892
907
|
});
|
|
908
|
+
|
|
909
|
+
context('FLEDGE', function() {
|
|
910
|
+
it('when FLEDGE is disabled, should not send imp.ext.ae', function () {
|
|
911
|
+
const request = spec.buildRequests(
|
|
912
|
+
bidRequestsWithMediaTypes,
|
|
913
|
+
{
|
|
914
|
+
...mockBidderRequest,
|
|
915
|
+
fledgeEnabled: false
|
|
916
|
+
}
|
|
917
|
+
);
|
|
918
|
+
expect(request[0].data.imp[0].ext).to.not.have.property('ae');
|
|
919
|
+
});
|
|
920
|
+
|
|
921
|
+
it('when FLEDGE is enabled, should send whatever is set in ortb2imp.ext.ae in all bid requests', function () {
|
|
922
|
+
const request = spec.buildRequests(bidRequestsWithMediaTypes, {
|
|
923
|
+
...mockBidderRequest,
|
|
924
|
+
fledgeEnabled: true
|
|
925
|
+
});
|
|
926
|
+
expect(request[0].data.imp[0].ext.ae).to.equal(2);
|
|
927
|
+
});
|
|
928
|
+
});
|
|
893
929
|
});
|
|
894
930
|
|
|
895
931
|
context('banner', function () {
|
|
@@ -1225,6 +1261,84 @@ describe('OpenxRtbAdapter', function () {
|
|
|
1225
1261
|
expect(bid.vastUrl).to.equal(winUrl);
|
|
1226
1262
|
});
|
|
1227
1263
|
});
|
|
1264
|
+
|
|
1265
|
+
context('when the response contains FLEDGE interest groups config', function() {
|
|
1266
|
+
let response;
|
|
1267
|
+
|
|
1268
|
+
beforeEach(function () {
|
|
1269
|
+
sinon.stub(config, 'getConfig')
|
|
1270
|
+
.withArgs('fledgeEnabled')
|
|
1271
|
+
.returns(true);
|
|
1272
|
+
|
|
1273
|
+
bidRequestConfigs = [{
|
|
1274
|
+
bidder: 'openx',
|
|
1275
|
+
params: {
|
|
1276
|
+
unit: '12345678',
|
|
1277
|
+
delDomain: 'test-del-domain'
|
|
1278
|
+
},
|
|
1279
|
+
adUnitCode: 'adunit-code',
|
|
1280
|
+
mediaTypes: {
|
|
1281
|
+
banner: {
|
|
1282
|
+
sizes: [[300, 250], [300, 600]],
|
|
1283
|
+
},
|
|
1284
|
+
},
|
|
1285
|
+
bidId: 'test-bid-id',
|
|
1286
|
+
bidderRequestId: 'test-bidder-request-id',
|
|
1287
|
+
auctionId: 'test-auction-id'
|
|
1288
|
+
}];
|
|
1289
|
+
|
|
1290
|
+
bidRequest = spec.buildRequests(bidRequestConfigs, {refererInfo: {}})[0];
|
|
1291
|
+
|
|
1292
|
+
bidResponse = {
|
|
1293
|
+
seatbid: [{
|
|
1294
|
+
bid: [{
|
|
1295
|
+
impid: 'test-bid-id',
|
|
1296
|
+
price: 2,
|
|
1297
|
+
w: 300,
|
|
1298
|
+
h: 250,
|
|
1299
|
+
crid: 'test-creative-id',
|
|
1300
|
+
dealid: 'test-deal-id',
|
|
1301
|
+
adm: 'test-ad-markup'
|
|
1302
|
+
}]
|
|
1303
|
+
}],
|
|
1304
|
+
cur: 'AUS',
|
|
1305
|
+
ext: {
|
|
1306
|
+
fledge_auction_configs: {
|
|
1307
|
+
'test-bid-id': {
|
|
1308
|
+
seller: 'codinginadtech.com',
|
|
1309
|
+
interestGroupBuyers: ['somedomain.com'],
|
|
1310
|
+
sellerTimeout: 0,
|
|
1311
|
+
perBuyerSignals: {
|
|
1312
|
+
'somedomain.com': {
|
|
1313
|
+
base_bid_micros: 0.1,
|
|
1314
|
+
disallowed_advertiser_ids: [
|
|
1315
|
+
'1234',
|
|
1316
|
+
'2345'
|
|
1317
|
+
],
|
|
1318
|
+
multiplier: 1.3,
|
|
1319
|
+
use_bid_multiplier: true,
|
|
1320
|
+
win_reporting_id: '1234567asdf'
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
response = spec.interpretResponse({body: bidResponse}, bidRequest);
|
|
1329
|
+
});
|
|
1330
|
+
|
|
1331
|
+
afterEach(function () {
|
|
1332
|
+
config.getConfig.restore();
|
|
1333
|
+
});
|
|
1334
|
+
|
|
1335
|
+
it('should return FLEDGE auction_configs alongside bids', function () {
|
|
1336
|
+
expect(response).to.have.property('bids');
|
|
1337
|
+
expect(response).to.have.property('fledgeAuctionConfigs');
|
|
1338
|
+
expect(response.fledgeAuctionConfigs.length).to.equal(1);
|
|
1339
|
+
expect(response.fledgeAuctionConfigs[0].bidId).to.equal('test-bid-id');
|
|
1340
|
+
});
|
|
1341
|
+
});
|
|
1228
1342
|
});
|
|
1229
1343
|
|
|
1230
1344
|
describe('user sync', function () {
|
|
@@ -318,6 +318,27 @@ describe('Outbrain Adapter', function () {
|
|
|
318
318
|
expect(resData.badv).to.deep.equal(['bad-advertiser'])
|
|
319
319
|
});
|
|
320
320
|
|
|
321
|
+
it('first party data', function () {
|
|
322
|
+
const bidRequest = {
|
|
323
|
+
...commonBidRequest,
|
|
324
|
+
...nativeBidRequestParams,
|
|
325
|
+
}
|
|
326
|
+
const bidderRequest = {
|
|
327
|
+
ortb2: {
|
|
328
|
+
bcat: ['IAB1', 'IAB2-1'],
|
|
329
|
+
badv: ['domain1.com', 'domain2.com'],
|
|
330
|
+
wlang: ['en'],
|
|
331
|
+
},
|
|
332
|
+
...commonBidderRequest,
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const res = spec.buildRequests([bidRequest], bidderRequest)
|
|
336
|
+
const resData = JSON.parse(res.data)
|
|
337
|
+
expect(resData.bcat).to.deep.equal(bidderRequest.ortb2.bcat)
|
|
338
|
+
expect(resData.badv).to.deep.equal(bidderRequest.ortb2.badv)
|
|
339
|
+
expect(resData.wlang).to.deep.equal(bidderRequest.ortb2.wlang)
|
|
340
|
+
});
|
|
341
|
+
|
|
321
342
|
it('should pass bidder timeout', function () {
|
|
322
343
|
const bidRequest = {
|
|
323
344
|
...commonBidRequest,
|
|
@@ -158,10 +158,22 @@ describe('the spotx adapter', function () {
|
|
|
158
158
|
position: 1
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
-
bid.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
161
|
+
bid.userIdAsEids = [{
|
|
162
|
+
source: 'adserver.org',
|
|
163
|
+
uids: [{id: 'tdid_1', atype: 1, ext: {rtiPartner: 'TDID'}}]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
source: 'id5-sync.com',
|
|
167
|
+
uids: [{id: 'id5id_1', ext: {}}]
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
source: 'uidapi.com',
|
|
171
|
+
uids: [{
|
|
172
|
+
id: 'uid_1',
|
|
173
|
+
atype: 3
|
|
174
|
+
}]
|
|
175
|
+
}
|
|
176
|
+
];
|
|
165
177
|
|
|
166
178
|
bid.crumbs = {
|
|
167
179
|
pubcid: 'pubcid_1'
|
|
@@ -205,6 +217,15 @@ describe('the spotx adapter', function () {
|
|
|
205
217
|
expect(request.data.user.ext).to.deep.equal({
|
|
206
218
|
consented_providers_settings: GOOGLE_CONSENT,
|
|
207
219
|
eids: [{
|
|
220
|
+
source: 'adserver.org',
|
|
221
|
+
uids: [{
|
|
222
|
+
id: 'tdid_1',
|
|
223
|
+
atype: 1,
|
|
224
|
+
ext: {
|
|
225
|
+
rtiPartner: 'TDID'
|
|
226
|
+
}
|
|
227
|
+
}]
|
|
228
|
+
}, {
|
|
208
229
|
source: 'id5-sync.com',
|
|
209
230
|
uids: [{
|
|
210
231
|
id: 'id5id_1',
|
|
@@ -212,16 +233,17 @@ describe('the spotx adapter', function () {
|
|
|
212
233
|
}]
|
|
213
234
|
},
|
|
214
235
|
{
|
|
215
|
-
source: '
|
|
236
|
+
source: 'uidapi.com',
|
|
216
237
|
uids: [{
|
|
217
|
-
id: '
|
|
238
|
+
id: 'uid_1',
|
|
239
|
+
atype: 3,
|
|
218
240
|
ext: {
|
|
219
|
-
rtiPartner: '
|
|
241
|
+
rtiPartner: 'UID2'
|
|
220
242
|
}
|
|
221
243
|
}]
|
|
222
244
|
}],
|
|
223
245
|
fpc: 'pubcid_1'
|
|
224
|
-
})
|
|
246
|
+
});
|
|
225
247
|
|
|
226
248
|
expect(request.data.source).to.deep.equal({
|
|
227
249
|
ext: {
|
|
@@ -89,6 +89,45 @@ describe('Taboola Adapter', function () {
|
|
|
89
89
|
}
|
|
90
90
|
expect(spec.isBidRequestValid(bid)).to.equal(true)
|
|
91
91
|
})
|
|
92
|
+
|
|
93
|
+
it('should succeed when url is null', function () {
|
|
94
|
+
const bid = {
|
|
95
|
+
bidder: 'taboola',
|
|
96
|
+
params: {
|
|
97
|
+
publisherId: 'publisherId',
|
|
98
|
+
tagId: 'below the article',
|
|
99
|
+
endpointUrl: null
|
|
100
|
+
},
|
|
101
|
+
...displayBidRequestParams
|
|
102
|
+
}
|
|
103
|
+
expect(spec.isBidRequestValid(bid)).to.equal(true)
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
it('should succeed when url is empty string', function () {
|
|
107
|
+
const bid = {
|
|
108
|
+
bidder: 'taboola',
|
|
109
|
+
params: {
|
|
110
|
+
publisherId: 'publisherId',
|
|
111
|
+
tagId: 'below the article',
|
|
112
|
+
endpointUrl: ''
|
|
113
|
+
},
|
|
114
|
+
...displayBidRequestParams
|
|
115
|
+
}
|
|
116
|
+
expect(spec.isBidRequestValid(bid)).to.equal(true)
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
it('should succeed when url is filled', function () {
|
|
120
|
+
const bid = {
|
|
121
|
+
bidder: 'taboola',
|
|
122
|
+
params: {
|
|
123
|
+
publisherId: 'publisherId',
|
|
124
|
+
tagId: 'below the article',
|
|
125
|
+
endpointUrl: 'https://example.com'
|
|
126
|
+
},
|
|
127
|
+
...displayBidRequestParams
|
|
128
|
+
}
|
|
129
|
+
expect(spec.isBidRequestValid(bid)).to.equal(true)
|
|
130
|
+
})
|
|
92
131
|
})
|
|
93
132
|
|
|
94
133
|
describe('buildRequests', function () {
|
|
@@ -148,6 +187,44 @@ describe('Taboola Adapter', function () {
|
|
|
148
187
|
|
|
149
188
|
expect(res.url).to.equal(`${END_POINT_URL}/${commonBidRequest.params.publisherId}`);
|
|
150
189
|
expect(res.data).to.deep.equal(JSON.stringify(expectedData));
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it('should fill the url when it is passed', function () {
|
|
193
|
+
const commonBidRequestWithUrl = {
|
|
194
|
+
bidder: 'taboola',
|
|
195
|
+
params: {
|
|
196
|
+
publisherId: 'publisherId',
|
|
197
|
+
tagId: 'placement name',
|
|
198
|
+
endpointUrl: 'https://example.com'
|
|
199
|
+
},
|
|
200
|
+
bidId: 'aa43860a-4644-442a-b5e0-93f268cs4d19',
|
|
201
|
+
auctionId: '65746dca-26f3-4186-be13-dfa63469b1b7',
|
|
202
|
+
}
|
|
203
|
+
let defaultBidRequestWithUrl = {
|
|
204
|
+
...commonBidRequestWithUrl,
|
|
205
|
+
...displayBidRequestParams,
|
|
206
|
+
}
|
|
207
|
+
const res = spec.buildRequests([defaultBidRequestWithUrl], commonBidderRequest);
|
|
208
|
+
expect(res.url).to.equal(`${commonBidRequestWithUrl.params.endpointUrl}/${commonBidRequest.params.publisherId}`);
|
|
209
|
+
})
|
|
210
|
+
|
|
211
|
+
it('should fill default url when url param is empty string', function () {
|
|
212
|
+
const commonBidRequestWithUrl = {
|
|
213
|
+
bidder: 'taboola',
|
|
214
|
+
params: {
|
|
215
|
+
publisherId: 'publisherId',
|
|
216
|
+
tagId: 'placement name',
|
|
217
|
+
endpointUrl: ''
|
|
218
|
+
},
|
|
219
|
+
bidId: 'aa43860a-4644-442a-b5e0-93f268cs4d19',
|
|
220
|
+
auctionId: '65746dca-26f3-4186-be13-dfa63469b1b7',
|
|
221
|
+
}
|
|
222
|
+
let defaultBidRequestWithUrl = {
|
|
223
|
+
...commonBidRequestWithUrl,
|
|
224
|
+
...displayBidRequestParams,
|
|
225
|
+
}
|
|
226
|
+
const res = spec.buildRequests([defaultBidRequestWithUrl], commonBidderRequest);
|
|
227
|
+
expect(res.url).to.equal(`${END_POINT_URL}/${commonBidRequestWithUrl.params.publisherId}`);
|
|
151
228
|
})
|
|
152
229
|
|
|
153
230
|
it('should pass optional parameters in request', function () {
|