prebid.js 5.18.0 → 6.1.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 +3 -1
- package/browsers.json +1 -8
- package/gulpfile.js +1 -0
- package/integrationExamples/gpt/akamaidap_segments_example.html +132 -0
- package/modules/.submodules.json +1 -0
- package/modules/adfBidAdapter.js +21 -16
- package/modules/adheseBidAdapter.js +7 -2
- package/modules/adkernelBidAdapter.js +1 -0
- package/modules/adlivetechBidAdapter.md +61 -0
- package/modules/adomikAnalyticsAdapter.js +10 -4
- package/modules/adtelligentBidAdapter.js +2 -1
- package/modules/airgridRtdProvider.js +1 -1
- package/modules/akamaiDapRtdProvider.js +474 -0
- package/modules/akamaiDapRtdProvider.md +47 -0
- package/modules/appnexusBidAdapter.js +9 -3
- package/modules/atsAnalyticsAdapter.js +67 -46
- package/modules/atsAnalyticsAdapter.md +1 -0
- package/modules/betweenBidAdapter.js +20 -3
- package/modules/browsiRtdProvider.js +106 -18
- package/modules/cleanioRtdProvider.js +192 -0
- package/modules/cleanioRtdProvider.md +59 -0
- package/modules/codefuelBidAdapter.js +181 -0
- package/modules/codefuelBidAdapter.md +111 -0
- package/modules/connectIdSystem.js +104 -0
- package/modules/connectIdSystem.md +33 -0
- package/modules/datablocksBidAdapter.js +3 -3
- package/modules/deepintentBidAdapter.js +107 -10
- package/modules/deepintentBidAdapter.md +36 -1
- package/modules/deltaprojectsBidAdapter.js +252 -0
- package/modules/deltaprojectsBidAdapter.md +32 -0
- package/modules/engageyaBidAdapter.js +171 -0
- package/modules/glimpseBidAdapter.js +31 -16
- package/modules/gptPreAuction.js +11 -5
- package/modules/gridBidAdapter.js +1 -0
- package/modules/gumgumBidAdapter.js +8 -0
- package/modules/id5IdSystem.md +6 -6
- package/modules/imRtdProvider.js +31 -0
- package/modules/inskinBidAdapter.js +7 -3
- package/modules/ixBidAdapter.js +174 -22
- package/modules/jixieBidAdapter.js +8 -2
- package/modules/justpremiumBidAdapter.js +6 -1
- package/modules/limelightDigitalBidAdapter.js +22 -2
- package/modules/livewrappedAnalyticsAdapter.js +49 -1
- package/modules/merkleIdSystem.js +5 -0
- package/modules/multibid/index.js +3 -3
- package/modules/nativoBidAdapter.js +32 -2
- package/modules/nextMillenniumBidAdapter.js +12 -3
- package/modules/oguryBidAdapter.js +16 -2
- package/modules/openxBidAdapter.js +40 -23
- 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/publinkIdSystem.js +11 -6
- package/modules/pubmaticBidAdapter.js +2 -0
- 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 +6 -1
- package/modules/sonobiBidAdapter.js +7 -0
- package/modules/sortableBidAdapter.js +1 -0
- package/modules/sspBCBidAdapter.js +34 -3
- package/modules/teadsBidAdapter.js +3 -0
- package/modules/tripleliftBidAdapter.js +22 -5
- package/modules/trustxBidAdapter.js +18 -7
- package/modules/undertoneBidAdapter.js +9 -5
- package/modules/undertoneBidAdapter.md +5 -1
- package/modules/userId/eids.js +18 -0
- package/modules/userId/eids.md +7 -0
- package/modules/userId/userId.md +12 -0
- package/modules/ventesBidAdapter.js +370 -0
- package/modules/ventesBidAdapter.md +94 -0
- package/modules/videobyteBidAdapter.js +13 -6
- package/modules/videobyteBidAdapter.md +49 -0
- package/modules/vidoomyBidAdapter.js +51 -100
- package/modules/visxBidAdapter.js +1 -1
- package/modules/yahoosspBidAdapter.js +6 -6
- package/modules/yieldlabBidAdapter.js +41 -10
- package/modules/yieldlabBidAdapter.md +91 -48
- package/modules/yieldmoSyntheticInventoryModule.js +46 -0
- package/modules/yieldmoSyntheticInventoryModule.md +68 -0
- package/package.json +6 -1
- package/src/adapterManager.js +19 -8
- package/src/adapters/bidderFactory.js +4 -3
- package/src/auction.js +11 -11
- package/src/constants.json +1 -0
- package/src/secureCreatives.js +6 -7
- package/src/targeting.js +11 -9
- package/test/spec/modules/adfBidAdapter_spec.js +83 -29
- package/test/spec/modules/adheseBidAdapter_spec.js +27 -1
- package/test/spec/modules/adomikAnalyticsAdapter_spec.js +3 -1
- package/test/spec/modules/adtelligentBidAdapter_spec.js +1 -0
- package/test/spec/modules/akamaiDapRtdProvider_spec.js +246 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +16 -1
- package/test/spec/modules/atsAnalyticsAdapter_spec.js +42 -9
- package/test/spec/modules/betweenBidAdapter_spec.js +41 -0
- 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 +316 -0
- package/test/spec/modules/connectIdSystem_spec.js +189 -0
- package/test/spec/modules/datablocksBidAdapter_spec.js +3 -3
- package/test/spec/modules/deepintentBidAdapter_spec.js +153 -3
- package/test/spec/modules/deltaprojectsBidAdapter_spec.js +399 -0
- package/test/spec/modules/engageyaBidAdapter_spec.js +422 -0
- package/test/spec/modules/eplanningBidAdapter_spec.js +8 -8
- package/test/spec/modules/glimpseBidAdapter_spec.js +33 -0
- package/test/spec/modules/gptPreAuction_spec.js +58 -4
- package/test/spec/modules/gumgumBidAdapter_spec.js +5 -1
- package/test/spec/modules/imRtdProvider_spec.js +25 -0
- package/test/spec/modules/ixBidAdapter_spec.js +298 -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 +155 -1
- package/test/spec/modules/livewrappedAnalyticsAdapter_spec.js +52 -7
- package/test/spec/modules/merkleIdSystem_spec.js +18 -0
- package/test/spec/modules/multibid_spec.js +31 -31
- package/test/spec/modules/nativoBidAdapter_spec.js +35 -18
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +13 -1
- package/test/spec/modules/oguryBidAdapter_spec.js +66 -23
- package/test/spec/modules/openxBidAdapter_spec.js +90 -13
- 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/publinkIdSystem_spec.js +6 -6
- package/test/spec/modules/seedtagBidAdapter_spec.js +3 -0
- package/test/spec/modules/smaatoBidAdapter_spec.js +30 -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/teadsBidAdapter_spec.js +132 -0
- package/test/spec/modules/tripleliftBidAdapter_spec.js +128 -0
- package/test/spec/modules/trustxBidAdapter_spec.js +45 -3
- package/test/spec/modules/undertoneBidAdapter_spec.js +52 -0
- package/test/spec/modules/ventesBidAdapter_spec.js +845 -0
- package/test/spec/modules/videobyteBidAdapter_spec.js +2 -2
- package/test/spec/modules/vidoomyBidAdapter_spec.js +32 -13
- package/test/spec/modules/visxBidAdapter_spec.js +1 -1
- package/test/spec/modules/yieldlabBidAdapter_spec.js +81 -0
- package/test/spec/modules/yieldmoSyntheticInventoryModule_spec.js +89 -0
- package/test/spec/unit/core/adapterManager_spec.js +56 -6
- package/test/spec/unit/core/bidderFactory_spec.js +61 -1
- package/test/spec/unit/pbjs_api_spec.js +37 -2
- package/test/spec/unit/secureCreatives_spec.js +54 -25
- package/wdio.conf.js +1 -1
|
@@ -2,7 +2,7 @@ import * as utils from 'src/utils.js';
|
|
|
2
2
|
import { config } from 'src/config.js';
|
|
3
3
|
import { expect } from 'chai';
|
|
4
4
|
import { newBidder } from 'src/adapters/bidderFactory.js';
|
|
5
|
-
import { spec } from 'modules/ixBidAdapter.js';
|
|
5
|
+
import { spec, storage, ERROR_CODES } from '../../../modules/ixBidAdapter.js';
|
|
6
6
|
import { createEidsArray } from 'modules/userId/eids.js';
|
|
7
7
|
|
|
8
8
|
describe('IndexexchangeAdapter', function () {
|
|
@@ -353,6 +353,37 @@ describe('IndexexchangeAdapter', function () {
|
|
|
353
353
|
]
|
|
354
354
|
};
|
|
355
355
|
|
|
356
|
+
const DEFAULT_VIDEO_BID_RESPONSE_WITH_MTYPE_SET = {
|
|
357
|
+
cur: 'USD',
|
|
358
|
+
id: '1aa2bb3cc4de',
|
|
359
|
+
seatbid: [
|
|
360
|
+
{
|
|
361
|
+
bid: [
|
|
362
|
+
{
|
|
363
|
+
crid: '12346',
|
|
364
|
+
adomain: ['www.abcd.com'],
|
|
365
|
+
adid: '14851456',
|
|
366
|
+
impid: '1a2b3c4e',
|
|
367
|
+
cid: '3051267',
|
|
368
|
+
price: 110,
|
|
369
|
+
id: '2',
|
|
370
|
+
mtype: 2,
|
|
371
|
+
adm: '<?xml version=\"1.0\" encoding=\"UTF-8\"?><VAST xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"vast.xsd\" version=\"3.0\"> <Ad id=\"488427365\"> <InLine> <AdSystem>Test</AdSystem> <AdTitle>In-Stream Video</AdTitle> </InLine> </Ad></VAST',
|
|
372
|
+
ext: {
|
|
373
|
+
vasturl: 'www.abcd.com/vast',
|
|
374
|
+
errorurl: 'www.abcd.com/error',
|
|
375
|
+
dspid: 51,
|
|
376
|
+
pricelevel: '_110',
|
|
377
|
+
advbrandid: 303326,
|
|
378
|
+
advbrand: 'OECTB'
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
seat: '3971'
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
};
|
|
386
|
+
|
|
356
387
|
const DEFAULT_OPTION = {
|
|
357
388
|
gdprConsent: {
|
|
358
389
|
gdprApplies: true,
|
|
@@ -1236,7 +1267,7 @@ describe('IndexexchangeAdapter', function () {
|
|
|
1236
1267
|
afterEach(function () {
|
|
1237
1268
|
config.setConfig({
|
|
1238
1269
|
ortb2: {}
|
|
1239
|
-
})
|
|
1270
|
+
});
|
|
1240
1271
|
});
|
|
1241
1272
|
|
|
1242
1273
|
it('should not set ixdiag.fpd value if not defined', function () {
|
|
@@ -1377,6 +1408,11 @@ describe('IndexexchangeAdapter', function () {
|
|
|
1377
1408
|
expect(requestUrl).to.equal(IX_SECURE_ENDPOINT);
|
|
1378
1409
|
});
|
|
1379
1410
|
|
|
1411
|
+
it('auction type should be set correctly', function () {
|
|
1412
|
+
const at = JSON.parse(query.r).at;
|
|
1413
|
+
expect(at).to.equal(1);
|
|
1414
|
+
})
|
|
1415
|
+
|
|
1380
1416
|
it('query object (version, siteID and request) should be correct', function () {
|
|
1381
1417
|
expect(query.v).to.equal(BANNER_ENDPOINT_VERSION);
|
|
1382
1418
|
expect(query.s).to.equal(DEFAULT_BANNER_VALID_BID[0].params.siteId);
|
|
@@ -1400,16 +1436,16 @@ describe('IndexexchangeAdapter', function () {
|
|
|
1400
1436
|
}
|
|
1401
1437
|
};
|
|
1402
1438
|
const requests = spec.buildRequests(validBids, DEFAULT_OPTION);
|
|
1403
|
-
const { dfp_ad_unit_code } = JSON.parse(requests[0].data.r).imp[0]
|
|
1439
|
+
const { ext: { dfp_ad_unit_code } } = JSON.parse(requests[0].data.r).imp[0];
|
|
1404
1440
|
expect(dfp_ad_unit_code).to.equal(AD_UNIT_CODE);
|
|
1405
1441
|
});
|
|
1406
1442
|
|
|
1407
1443
|
it('should not send dfp_adunit_code in request if ortb2Imp.ext.data.adserver.adslot does not exists', function () {
|
|
1408
1444
|
const validBids = utils.deepClone(DEFAULT_BANNER_VALID_BID);
|
|
1409
1445
|
const requests = spec.buildRequests(validBids, DEFAULT_OPTION);
|
|
1410
|
-
const {
|
|
1446
|
+
const { ext } = JSON.parse(requests[0].data.r).imp[0];
|
|
1411
1447
|
|
|
1412
|
-
expect(
|
|
1448
|
+
expect(ext).to.not.exist;
|
|
1413
1449
|
});
|
|
1414
1450
|
|
|
1415
1451
|
it('payload should have correct format and value', function () {
|
|
@@ -1929,6 +1965,11 @@ describe('IndexexchangeAdapter', function () {
|
|
|
1929
1965
|
expect(query.nf).to.equal(1);
|
|
1930
1966
|
});
|
|
1931
1967
|
|
|
1968
|
+
it('auction type should be set correctly', function () {
|
|
1969
|
+
const at = JSON.parse(query.r).at;
|
|
1970
|
+
expect(at).to.equal(1);
|
|
1971
|
+
})
|
|
1972
|
+
|
|
1932
1973
|
it('impression should have correct format and value', function () {
|
|
1933
1974
|
const impression = JSON.parse(query.r).imp[0];
|
|
1934
1975
|
const sidValue = utils.parseGPTSingleSizeArray(DEFAULT_VIDEO_VALID_BID[0].params.size);
|
|
@@ -2333,6 +2374,45 @@ describe('IndexexchangeAdapter', function () {
|
|
|
2333
2374
|
expect(result[0]).to.deep.equal(expectedParse[0]);
|
|
2334
2375
|
});
|
|
2335
2376
|
|
|
2377
|
+
it('should get correct bid response for video ad and set bid.vastXml when mtype is 2 (video)', function () {
|
|
2378
|
+
const expectedParse = [
|
|
2379
|
+
{
|
|
2380
|
+
requestId: '1a2b3c4e',
|
|
2381
|
+
cpm: 1.1,
|
|
2382
|
+
creativeId: '12346',
|
|
2383
|
+
mediaType: 'video',
|
|
2384
|
+
mediaTypes: {
|
|
2385
|
+
video: {
|
|
2386
|
+
context: 'instream',
|
|
2387
|
+
playerSize: [
|
|
2388
|
+
[
|
|
2389
|
+
400,
|
|
2390
|
+
100
|
|
2391
|
+
]
|
|
2392
|
+
]
|
|
2393
|
+
}
|
|
2394
|
+
},
|
|
2395
|
+
width: 640,
|
|
2396
|
+
height: 480,
|
|
2397
|
+
currency: 'USD',
|
|
2398
|
+
ttl: 3600,
|
|
2399
|
+
netRevenue: true,
|
|
2400
|
+
vastXml: '<?xml version=\"1.0\" encoding=\"UTF-8\"?><VAST xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"vast.xsd\" version=\"3.0\"> <Ad id=\"488427365\"> <InLine> <AdSystem>Test</AdSystem> <AdTitle>In-Stream Video</AdTitle> </InLine> </Ad></VAST',
|
|
2401
|
+
meta: {
|
|
2402
|
+
networkId: 51,
|
|
2403
|
+
brandId: 303326,
|
|
2404
|
+
brandName: 'OECTB',
|
|
2405
|
+
advertiserDomains: ['www.abcd.com']
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
];
|
|
2409
|
+
const result = spec.interpretResponse({ body: DEFAULT_VIDEO_BID_RESPONSE_WITH_MTYPE_SET }, {
|
|
2410
|
+
data: DEFAULT_BIDDER_REQUEST_DATA, validBidRequests: ONE_VIDEO
|
|
2411
|
+
});
|
|
2412
|
+
|
|
2413
|
+
expect(result[0]).to.deep.equal(expectedParse[0]);
|
|
2414
|
+
});
|
|
2415
|
+
|
|
2336
2416
|
it('bidrequest should not have page if options is undefined', function () {
|
|
2337
2417
|
const options = {};
|
|
2338
2418
|
const validBidWithoutreferInfo = spec.buildRequests(DEFAULT_BANNER_VALID_BID, options);
|
|
@@ -2514,4 +2594,217 @@ describe('IndexexchangeAdapter', function () {
|
|
|
2514
2594
|
expect(r.regs.coppa).to.be.undefined;
|
|
2515
2595
|
});
|
|
2516
2596
|
});
|
|
2597
|
+
|
|
2598
|
+
describe('LocalStorage ixdiag', () => {
|
|
2599
|
+
let TODAY = new Date().toISOString().slice(0, 10);
|
|
2600
|
+
const key = 'ixdiag';
|
|
2601
|
+
|
|
2602
|
+
let sandbox;
|
|
2603
|
+
let setDataInLocalStorageStub;
|
|
2604
|
+
let getDataFromLocalStorageStub;
|
|
2605
|
+
let removeDataFromLocalStorageStub;
|
|
2606
|
+
let localStorageValues = {};
|
|
2607
|
+
|
|
2608
|
+
beforeEach(() => {
|
|
2609
|
+
sandbox = sinon.sandbox.create();
|
|
2610
|
+
setDataInLocalStorageStub = sandbox.stub(storage, 'setDataInLocalStorage').callsFake((key, value) => localStorageValues[key] = value)
|
|
2611
|
+
getDataFromLocalStorageStub = sandbox.stub(storage, 'getDataFromLocalStorage').callsFake((key) => localStorageValues[key])
|
|
2612
|
+
removeDataFromLocalStorageStub = sandbox.stub(storage, 'removeDataFromLocalStorage').callsFake((key) => delete localStorageValues[key])
|
|
2613
|
+
sandbox.stub(storage, 'localStorageIsEnabled').returns(true);
|
|
2614
|
+
});
|
|
2615
|
+
|
|
2616
|
+
afterEach(() => {
|
|
2617
|
+
setDataInLocalStorageStub.restore();
|
|
2618
|
+
getDataFromLocalStorageStub.restore();
|
|
2619
|
+
removeDataFromLocalStorageStub.restore();
|
|
2620
|
+
localStorageValues = {};
|
|
2621
|
+
sandbox.restore();
|
|
2622
|
+
|
|
2623
|
+
config.setConfig({
|
|
2624
|
+
fpd: {},
|
|
2625
|
+
ix: {},
|
|
2626
|
+
})
|
|
2627
|
+
});
|
|
2628
|
+
|
|
2629
|
+
it('should not log error in LocalStorage when there is no logError called.', () => {
|
|
2630
|
+
const bid = DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0];
|
|
2631
|
+
expect(spec.isBidRequestValid(bid)).to.be.true;
|
|
2632
|
+
expect(localStorageValues[key]).to.be.undefined;
|
|
2633
|
+
});
|
|
2634
|
+
|
|
2635
|
+
it('should log ERROR_CODES.BID_SIZE_INVALID_FORMAT in LocalStorage when there is logError called.', () => {
|
|
2636
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2637
|
+
bid.params.size = ['400', 100];
|
|
2638
|
+
|
|
2639
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2640
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.BID_SIZE_INVALID_FORMAT]: 1 } });
|
|
2641
|
+
});
|
|
2642
|
+
|
|
2643
|
+
it('should log ERROR_CODES.BID_SIZE_NOT_INCLUDED in LocalStorage when there is logError called.', () => {
|
|
2644
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2645
|
+
bid.params.size = [407, 100];
|
|
2646
|
+
|
|
2647
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2648
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.BID_SIZE_NOT_INCLUDED]: 1 } });
|
|
2649
|
+
});
|
|
2650
|
+
|
|
2651
|
+
it('should log ERROR_CODES.PROPERTY_NOT_INCLUDED in LocalStorage when there is logError called.', () => {
|
|
2652
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2653
|
+
bid.params.video = {};
|
|
2654
|
+
|
|
2655
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2656
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.PROPERTY_NOT_INCLUDED]: 4 } });
|
|
2657
|
+
});
|
|
2658
|
+
|
|
2659
|
+
it('should log ERROR_CODES.SITE_ID_INVALID_VALUE in LocalStorage when there is logError called.', () => {
|
|
2660
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2661
|
+
bid.params.siteId = false;
|
|
2662
|
+
|
|
2663
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2664
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.SITE_ID_INVALID_VALUE]: 1 } });
|
|
2665
|
+
});
|
|
2666
|
+
|
|
2667
|
+
it('should log ERROR_CODES.BID_FLOOR_INVALID_FORMAT in LocalStorage when there is logError called.', () => {
|
|
2668
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2669
|
+
bid.params.bidFloor = true;
|
|
2670
|
+
|
|
2671
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2672
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.BID_FLOOR_INVALID_FORMAT]: 1 } });
|
|
2673
|
+
});
|
|
2674
|
+
|
|
2675
|
+
it('should log ERROR_CODES.IX_FPD_EXCEEDS_MAX_SIZE in LocalStorage when there is logError called.', () => {
|
|
2676
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2677
|
+
|
|
2678
|
+
config.setConfig({
|
|
2679
|
+
ix: {
|
|
2680
|
+
firstPartyData: {
|
|
2681
|
+
cd: Array(1700).join('#')
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
});
|
|
2685
|
+
|
|
2686
|
+
expect(spec.isBidRequestValid(bid)).to.be.true;
|
|
2687
|
+
spec.buildRequests([bid]);
|
|
2688
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.IX_FPD_EXCEEDS_MAX_SIZE]: 2 } });
|
|
2689
|
+
});
|
|
2690
|
+
|
|
2691
|
+
it('should log ERROR_CODES.EXCEEDS_MAX_SIZE in LocalStorage when there is logError called.', () => {
|
|
2692
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2693
|
+
bid.bidderRequestId = Array(8000).join('#');
|
|
2694
|
+
|
|
2695
|
+
expect(spec.isBidRequestValid(bid)).to.be.true;
|
|
2696
|
+
spec.buildRequests([bid]);
|
|
2697
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.EXCEEDS_MAX_SIZE]: 2 } });
|
|
2698
|
+
});
|
|
2699
|
+
|
|
2700
|
+
it('should log ERROR_CODES.PB_FPD_EXCEEDS_MAX_SIZE in LocalStorage when there is logError called.', () => {
|
|
2701
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2702
|
+
|
|
2703
|
+
config.setConfig({
|
|
2704
|
+
fpd: {
|
|
2705
|
+
site: {
|
|
2706
|
+
data: {
|
|
2707
|
+
pageType: Array(5700).join('#')
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
});
|
|
2712
|
+
|
|
2713
|
+
expect(spec.isBidRequestValid(bid)).to.be.true;
|
|
2714
|
+
spec.buildRequests([bid]);
|
|
2715
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.PB_FPD_EXCEEDS_MAX_SIZE]: 2 } });
|
|
2716
|
+
});
|
|
2717
|
+
|
|
2718
|
+
it('should log ERROR_CODES.VIDEO_DURATION_INVALID in LocalStorage when there is logError called.', () => {
|
|
2719
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2720
|
+
bid.params.video.minduration = 1;
|
|
2721
|
+
bid.params.video.maxduration = 0;
|
|
2722
|
+
|
|
2723
|
+
expect(spec.isBidRequestValid(bid)).to.be.true;
|
|
2724
|
+
spec.buildRequests([bid]);
|
|
2725
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.VIDEO_DURATION_INVALID]: 2 } });
|
|
2726
|
+
});
|
|
2727
|
+
|
|
2728
|
+
it('should increment errors for errorCode', () => {
|
|
2729
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2730
|
+
bid.params.video = {};
|
|
2731
|
+
|
|
2732
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2733
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.PROPERTY_NOT_INCLUDED]: 4 } });
|
|
2734
|
+
|
|
2735
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2736
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.PROPERTY_NOT_INCLUDED]: 8 } });
|
|
2737
|
+
});
|
|
2738
|
+
|
|
2739
|
+
it('should add new errorCode to ixdiag.', () => {
|
|
2740
|
+
let bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2741
|
+
bid.params.size = ['400', 100];
|
|
2742
|
+
|
|
2743
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2744
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { [ERROR_CODES.BID_SIZE_INVALID_FORMAT]: 1 } });
|
|
2745
|
+
|
|
2746
|
+
bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2747
|
+
bid.params.siteId = false;
|
|
2748
|
+
|
|
2749
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2750
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({
|
|
2751
|
+
[TODAY]: {
|
|
2752
|
+
[ERROR_CODES.BID_SIZE_INVALID_FORMAT]: 1,
|
|
2753
|
+
[ERROR_CODES.SITE_ID_INVALID_VALUE]: 1
|
|
2754
|
+
}
|
|
2755
|
+
});
|
|
2756
|
+
});
|
|
2757
|
+
|
|
2758
|
+
it('should clear errors with successful response', () => {
|
|
2759
|
+
const ixdiag = { [TODAY]: { '1': 1, '3': 8, '4': 1 } };
|
|
2760
|
+
setDataInLocalStorageStub(key, JSON.stringify(ixdiag));
|
|
2761
|
+
|
|
2762
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal(ixdiag);
|
|
2763
|
+
|
|
2764
|
+
const request = DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0];
|
|
2765
|
+
expect(spec.isBidRequestValid(request)).to.be.true;
|
|
2766
|
+
|
|
2767
|
+
const data = {
|
|
2768
|
+
...utils.deepClone(DEFAULT_BIDDER_REQUEST_DATA[0]),
|
|
2769
|
+
r: JSON.stringify({
|
|
2770
|
+
id: '345',
|
|
2771
|
+
imp: [
|
|
2772
|
+
{
|
|
2773
|
+
id: '1a2b3c4e',
|
|
2774
|
+
}
|
|
2775
|
+
],
|
|
2776
|
+
ext: {
|
|
2777
|
+
ixdiag: {
|
|
2778
|
+
err: {
|
|
2779
|
+
'4': 8
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
}),
|
|
2784
|
+
};
|
|
2785
|
+
|
|
2786
|
+
const validBidRequests = [
|
|
2787
|
+
DEFAULT_MULTIFORMAT_BANNER_VALID_BID[0],
|
|
2788
|
+
DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]
|
|
2789
|
+
];
|
|
2790
|
+
|
|
2791
|
+
spec.interpretResponse({ body: DEFAULT_BANNER_BID_RESPONSE }, { data, validBidRequests });
|
|
2792
|
+
|
|
2793
|
+
expect(localStorageValues[key]).to.be.undefined;
|
|
2794
|
+
});
|
|
2795
|
+
|
|
2796
|
+
it('should clear errors after 7 day expiry errorCode', () => {
|
|
2797
|
+
const EXPIRED_DATE = '2019-12-12';
|
|
2798
|
+
|
|
2799
|
+
const ixdiag = { [EXPIRED_DATE]: { '1': 1, '3': 8, '4': 1 }, [TODAY]: { '3': 8, '4': 1 } };
|
|
2800
|
+
setDataInLocalStorageStub(key, JSON.stringify(ixdiag));
|
|
2801
|
+
|
|
2802
|
+
const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
|
|
2803
|
+
bid.params.size = ['400', 100];
|
|
2804
|
+
|
|
2805
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
2806
|
+
expect(JSON.parse(localStorageValues[key])[EXPIRED_DATE]).to.be.undefined;
|
|
2807
|
+
expect(JSON.parse(localStorageValues[key])).to.deep.equal({ [TODAY]: { '1': 1, '3': 8, '4': 1 } })
|
|
2808
|
+
});
|
|
2809
|
+
});
|
|
2517
2810
|
});
|
|
@@ -9,6 +9,7 @@ describe('jixie Adapter', function () {
|
|
|
9
9
|
const device_ = 'desktop';
|
|
10
10
|
const timeout_ = 1000;
|
|
11
11
|
const currency_ = 'USD';
|
|
12
|
+
const keywords_ = '';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Basic
|
|
@@ -212,7 +213,7 @@ describe('jixie Adapter', function () {
|
|
|
212
213
|
);
|
|
213
214
|
let miscDimsStub = sinon.stub(jixieaux, 'getMiscDims');
|
|
214
215
|
miscDimsStub
|
|
215
|
-
.returns({ device: device_, pageurl: pageurl_, domain: domain_ });
|
|
216
|
+
.returns({ device: device_, pageurl: pageurl_, domain: domain_, mkeywords: keywords_ });
|
|
216
217
|
|
|
217
218
|
// actual api call:
|
|
218
219
|
const request = spec.buildRequests(bidRequests_, bidderRequest_);
|
|
@@ -229,6 +230,7 @@ describe('jixie Adapter', function () {
|
|
|
229
230
|
expect(payload).to.have.property('device', device_);
|
|
230
231
|
expect(payload).to.have.property('domain', domain_);
|
|
231
232
|
expect(payload).to.have.property('pageurl', pageurl_);
|
|
233
|
+
expect(payload).to.have.property('mkeywords', keywords_);
|
|
232
234
|
expect(payload).to.have.property('timeout', timeout_);
|
|
233
235
|
expect(payload).to.have.property('currency', currency_);
|
|
234
236
|
expect(payload).to.have.property('bids').that.deep.equals(refBids_);
|
|
@@ -243,15 +245,15 @@ describe('jixie Adapter', function () {
|
|
|
243
245
|
/**
|
|
244
246
|
* interpretResponse:
|
|
245
247
|
*/
|
|
246
|
-
const JX_OTHER_OUTSTREAM_RENDERER_URL = 'https://scripts.jixie.
|
|
247
|
-
const JX_OUTSTREAM_RENDERER_URL = 'https://scripts.jixie.
|
|
248
|
+
const JX_OTHER_OUTSTREAM_RENDERER_URL = 'https://scripts.jixie.media/dummyscript.js';
|
|
249
|
+
const JX_OUTSTREAM_RENDERER_URL = 'https://scripts.jixie.media/jxhbrenderer.1.1.min.js';
|
|
248
250
|
|
|
249
|
-
const mockVastXml_ = `<?xml version="1.0" encoding="UTF-8"?><VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0"><Ad id="JXAD521"><InLine><AdSystem>JXADSERVER</AdSystem><AdTitle>Alway%20Live%20Prebid%20Creative</AdTitle><Description>Hybrid in-stream</Description><Error><![CDATA[https://demo.com?action=error&errorcode=[ERRORCODE]&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Error><Impression><![CDATA[https://demo.com?action=impression&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Impression><Creatives><Creative id="JXAD521" sequence="1"><Linear><Duration>00:00:10</Duration><TrackingEvents><Tracking event="start"><![CDATA[https://demo.com?action=start&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="firstQuartile"><![CDATA[https://demo.com?action=firstQuartile&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="midpoint"><![CDATA[https://demo.com?action=midpoint&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="thirdQuartile"><![CDATA[https://demo.com?action=thirdQuartile&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="complete"><![CDATA[https://demo.com?action=complete&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="mute"><![CDATA[https://demo.com?action=mute&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="unmute"><![CDATA[https://demo.com?action=unmute&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="rewind"><![CDATA[https://demo.com?action=rewind&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="pause"><![CDATA[https://demo.com?action=pause&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="resume"><![CDATA[https://demo.com?action=resume&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="fullscreen"><![CDATA[https://demo.com?action=fullscreen&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="creativeView"><![CDATA[https://demo.com?action=creativeView&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking></TrackingEvents><VideoClicks><ClickThrough><![CDATA[https://toko-iot.com/search/?q=Sonos&utm_source=ivs&utm_medium=video&utm_campaign=promo&utm_content=sonos_category]]></ClickThrough><ClickTracking id="521"><![CDATA[https://demo.com?action=click&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></ClickTracking></VideoClicks><MediaFiles><MediaFile apiFramework="VPAID" type="application/javascript"><![CDATA[https://creatives.b-cdn.net/js/jxvpaid_1_0.min.js]]></MediaFile></MediaFiles><AdParameters><![CDATA[{"embed":true,"videos":[{"url":"https://creative-ivstream.ivideosmart.com/3001004/954006/3001004-954006_240.mp4","bitrate":186,"mimetype":"video/mp4"},{"url":"https://creative-ivstream.ivideosmart.com/3001004/954006/3001004-954006_360.mp4","bitrate":229,"mimetype":"video/mp4"},{"url":"https://creative-ivstream.ivideosmart.com/3001004/954006/3001004-954006_480.mp4","bitrate":279,"mimetype":"video/mp4"},{"url":"https://creative-ivstream.ivideosmart.com/3001004/954006/3001004-954006_720.mp4","bitrate":325,"mimetype":"video/mp4"}],"countpos":"left","hotspots":[{"type":"direct_url","start":0,"duration":10,"position":"top-right","direct_url":"https://toko-iot.com/catalogue/category/audio_8/?utm_source=ivs&utm_medium=banner&utm_campaign=promo&utm_content=audio_category","thumbnail_url":"https://creatives.ivideosmart.com/hotspots/TokoIOT_1.gif","thumbnail_style":"full-height"}],"clickthru":"https://toko-iot.com/search/?q=Sonos&utm_source=ivs&utm_medium=video&utm_campaign=promo&utm_content=sonos_category","reporting":{},"skipoffset":5}]]></AdParameters><Icons><Icon program="AdChoices" width="20" height="20" xPosition="right" yPosition="top" offset="00:00:02"><StaticResource creativeType="image/png"><![CDATA[https://creatives.jixie.
|
|
251
|
+
const mockVastXml_ = `<?xml version="1.0" encoding="UTF-8"?><VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0"><Ad id="JXAD521"><InLine><AdSystem>JXADSERVER</AdSystem><AdTitle>Alway%20Live%20Prebid%20Creative</AdTitle><Description>Hybrid in-stream</Description><Error><![CDATA[https://demo.com?action=error&errorcode=[ERRORCODE]&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Error><Impression><![CDATA[https://demo.com?action=impression&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Impression><Creatives><Creative id="JXAD521" sequence="1"><Linear><Duration>00:00:10</Duration><TrackingEvents><Tracking event="start"><![CDATA[https://demo.com?action=start&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="firstQuartile"><![CDATA[https://demo.com?action=firstQuartile&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="midpoint"><![CDATA[https://demo.com?action=midpoint&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="thirdQuartile"><![CDATA[https://demo.com?action=thirdQuartile&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="complete"><![CDATA[https://demo.com?action=complete&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="mute"><![CDATA[https://demo.com?action=mute&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="unmute"><![CDATA[https://demo.com?action=unmute&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="rewind"><![CDATA[https://demo.com?action=rewind&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="pause"><![CDATA[https://demo.com?action=pause&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="resume"><![CDATA[https://demo.com?action=resume&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="fullscreen"><![CDATA[https://demo.com?action=fullscreen&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking><Tracking event="creativeView"><![CDATA[https://demo.com?action=creativeView&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></Tracking></TrackingEvents><VideoClicks><ClickThrough><![CDATA[https://toko-iot.com/search/?q=Sonos&utm_source=ivs&utm_medium=video&utm_campaign=promo&utm_content=sonos_category]]></ClickThrough><ClickTracking id="521"><![CDATA[https://demo.com?action=click&mediaurl=[ASSETURI]&abc=1&stackidx=0]]></ClickTracking></VideoClicks><MediaFiles><MediaFile apiFramework="VPAID" type="application/javascript"><![CDATA[https://creatives.b-cdn.net/js/jxvpaid_1_0.min.js]]></MediaFile></MediaFiles><AdParameters><![CDATA[{"embed":true,"videos":[{"url":"https://creative-ivstream.ivideosmart.com/3001004/954006/3001004-954006_240.mp4","bitrate":186,"mimetype":"video/mp4"},{"url":"https://creative-ivstream.ivideosmart.com/3001004/954006/3001004-954006_360.mp4","bitrate":229,"mimetype":"video/mp4"},{"url":"https://creative-ivstream.ivideosmart.com/3001004/954006/3001004-954006_480.mp4","bitrate":279,"mimetype":"video/mp4"},{"url":"https://creative-ivstream.ivideosmart.com/3001004/954006/3001004-954006_720.mp4","bitrate":325,"mimetype":"video/mp4"}],"countpos":"left","hotspots":[{"type":"direct_url","start":0,"duration":10,"position":"top-right","direct_url":"https://toko-iot.com/catalogue/category/audio_8/?utm_source=ivs&utm_medium=banner&utm_campaign=promo&utm_content=audio_category","thumbnail_url":"https://creatives.ivideosmart.com/hotspots/TokoIOT_1.gif","thumbnail_style":"full-height"}],"clickthru":"https://toko-iot.com/search/?q=Sonos&utm_source=ivs&utm_medium=video&utm_campaign=promo&utm_content=sonos_category","reporting":{},"skipoffset":5}]]></AdParameters><Icons><Icon program="AdChoices" width="20" height="20" xPosition="right" yPosition="top" offset="00:00:02"><StaticResource creativeType="image/png"><![CDATA[https://creatives.jixie.media/jxadchoice.png]]></StaticResource><IconClicks><IconClickThrough><![CDATA[https://www.jixie.io/privacy-policy]]></IconClickThrough></IconClicks></Icon></Icons></Linear></Creative><Creative sequence="1"/></Creatives></InLine></Ad></VAST>`;
|
|
250
252
|
const responseBody_ = {
|
|
251
253
|
'bids': [
|
|
252
254
|
// video (vast tag url) returned here
|
|
253
255
|
{
|
|
254
|
-
'trackingUrlBase': 'https://
|
|
256
|
+
'trackingUrlBase': 'https://traid.jixie.io/sync/ad?',
|
|
255
257
|
'jxBidId': '62847e4c696edcb-028d5dee-2c83-44e3-bed1-b75002475cdf',
|
|
256
258
|
'requestId': '62847e4c696edcb',
|
|
257
259
|
'cpm': 2.19,
|
|
@@ -284,7 +286,7 @@ describe('jixie Adapter', function () {
|
|
|
284
286
|
// display ad returned here: This one there is advertiserDomains
|
|
285
287
|
// in the response . Will be checked in the unit tests below
|
|
286
288
|
{
|
|
287
|
-
'trackingUrlBase': 'https://
|
|
289
|
+
'trackingUrlBase': 'https://traid.jixie.io/sync/ad?',
|
|
288
290
|
'jxBidId': '600c9ae6fda1acb-028d5dee-2c83-44e3-bed1-b75002475cdf',
|
|
289
291
|
'requestId': '600c9ae6fda1acb',
|
|
290
292
|
'cpm': 1.999,
|
|
@@ -317,11 +319,11 @@ describe('jixie Adapter', function () {
|
|
|
317
319
|
],
|
|
318
320
|
'mediaType': 'BANNER'
|
|
319
321
|
},
|
|
320
|
-
'ad': '<div id="jxoutstream" style="width: 100%;"> <script type="text/javascript" src="https://scripts.jixie.
|
|
322
|
+
'ad': '<div id="jxoutstream" style="width: 100%;"> <script type="text/javascript" src="https://scripts.jixie.media/jxfriendly.1.3.min.js" defer=""></script> <script> var p ={ responsive: 1, nested: 1, maxwidth: 640, container: "jxoutstream", creativeid: 520}; function jxdefer(p) { if (window.jxuniversal) { window.jxuniversal.init(p); } else { setTimeout(function() { jxdefer(p) }, 100); } } jxdefer(p); </script> </div>'
|
|
321
323
|
},
|
|
322
324
|
// outstream, jx non-default renderer specified:
|
|
323
325
|
{
|
|
324
|
-
'trackingUrlBase': 'https://
|
|
326
|
+
'trackingUrlBase': 'https://traid.jixie.io/sync/ad?',
|
|
325
327
|
'jxBidId': '99bc539c81b00ce-028d5dee-2c83-44e3-bed1-b75002475cdf',
|
|
326
328
|
'requestId': '99bc539c81b00ce',
|
|
327
329
|
'cpm': 2.99,
|
|
@@ -340,7 +342,7 @@ describe('jixie Adapter', function () {
|
|
|
340
342
|
},
|
|
341
343
|
// outstream, jx default renderer:
|
|
342
344
|
{
|
|
343
|
-
'trackingUrlBase': 'https://
|
|
345
|
+
'trackingUrlBase': 'https://traid.jixie.io/sync/ad?',
|
|
344
346
|
'jxBidId': '61bc539c81b00ce-028d5dee-2c83-44e3-bed1-b75002475cdf',
|
|
345
347
|
'requestId': '61bc539c81b00ce',
|
|
346
348
|
'cpm': 1.99,
|
|
@@ -475,7 +477,7 @@ describe('jixie Adapter', function () {
|
|
|
475
477
|
ajaxStub = sinon.stub(jixieaux, 'ajax');
|
|
476
478
|
|
|
477
479
|
miscDimsStub
|
|
478
|
-
.returns({ device: device_, pageurl: pageurl_, domain: domain_ });
|
|
480
|
+
.returns({ device: device_, pageurl: pageurl_, domain: domain_, mkeywords: keywords_ });
|
|
479
481
|
})
|
|
480
482
|
|
|
481
483
|
afterEach(function() {
|
|
@@ -537,7 +539,7 @@ describe('jixie Adapter', function () {
|
|
|
537
539
|
ajaxStub = sinon.stub(jixieaux, 'ajax');
|
|
538
540
|
miscDimsStub = sinon.stub(jixieaux, 'getMiscDims');
|
|
539
541
|
miscDimsStub
|
|
540
|
-
.returns({ device: device_, pageurl: pageurl_, domain: domain_ });
|
|
542
|
+
.returns({ device: device_, pageurl: pageurl_, domain: domain_, mkeywords: keywords_ });
|
|
541
543
|
})
|
|
542
544
|
|
|
543
545
|
afterEach(function() {
|
|
@@ -97,7 +97,7 @@ describe('justpremium adapter', function () {
|
|
|
97
97
|
expect(jpxRequest.id).to.equal(adUnits[0].params.zone)
|
|
98
98
|
expect(jpxRequest.mediaTypes && jpxRequest.mediaTypes.banner && jpxRequest.mediaTypes.banner.sizes).to.not.equal('undefined')
|
|
99
99
|
expect(jpxRequest.version.prebid).to.equal('$prebid.version$')
|
|
100
|
-
expect(jpxRequest.version.jp_adapter).to.equal('1.8')
|
|
100
|
+
expect(jpxRequest.version.jp_adapter).to.equal('1.8.1')
|
|
101
101
|
expect(jpxRequest.pubcid).to.equal('0000000')
|
|
102
102
|
expect(jpxRequest.uids.tdid).to.equal('1111111')
|
|
103
103
|
expect(jpxRequest.uids.id5id.uid).to.equal('2222222')
|
|
@@ -118,7 +118,10 @@ describe('justpremium adapter', function () {
|
|
|
118
118
|
'price': 0.52,
|
|
119
119
|
'format': 'lb',
|
|
120
120
|
'adm': 'creative code',
|
|
121
|
-
'adomain': ['justpremium.com']
|
|
121
|
+
'adomain': ['justpremium.com'],
|
|
122
|
+
'ext': {
|
|
123
|
+
'pg': true
|
|
124
|
+
}
|
|
122
125
|
}]
|
|
123
126
|
},
|
|
124
127
|
'pass': {
|
|
@@ -142,6 +145,9 @@ describe('justpremium adapter', function () {
|
|
|
142
145
|
meta: {
|
|
143
146
|
advertiserDomains: ['justpremium.com']
|
|
144
147
|
},
|
|
148
|
+
adserverTargeting: {
|
|
149
|
+
'hb_deal_justpremium': 'jp_pg'
|
|
150
|
+
}
|
|
145
151
|
}
|
|
146
152
|
]
|
|
147
153
|
|
|
@@ -159,6 +165,7 @@ describe('justpremium adapter', function () {
|
|
|
159
165
|
expect(result[0].netRevenue).to.equal(true)
|
|
160
166
|
expect(result[0].format).to.equal('lb')
|
|
161
167
|
expect(result[0].meta.advertiserDomains[0]).to.equal('justpremium.com')
|
|
168
|
+
expect(result[0].adserverTargeting).to.deep.equal({'hb_deal_justpremium': 'jp_pg'})
|
|
162
169
|
})
|
|
163
170
|
|
|
164
171
|
it('Verify wrong server response', function () {
|
|
@@ -53,7 +53,6 @@ describe('The Konduit vast wrapper module', function () {
|
|
|
53
53
|
const callback = sinon.spy();
|
|
54
54
|
processBids({ bid, callback });
|
|
55
55
|
server.respond();
|
|
56
|
-
|
|
57
56
|
expect(server.requests.length).to.equal(1);
|
|
58
57
|
|
|
59
58
|
const requestBody = JSON.parse(server.requests[0].requestBody);
|