prebid.js 7.45.0 → 7.47.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/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admaticBidAdapter.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.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/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/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/criteoIdSystem.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/dependencies.json +3 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/emtvBidAdapter.js +1 -0
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/eskimiBidAdapter.js +1 -0
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/gridBidAdapter.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/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/kueezRtbBidAdapter.js +1 -1
- package/dist/kulturemediaBidAdapter.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/magniteAnalyticsAdapter.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/minutemediaplusBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/nativoBidAdapter.js +1 -1
- package/dist/neuwoRtdProvider.js +1 -1
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +137 -135
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/ortbConverter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/pairIdSystem.js +1 -0
- 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/rtbhouseBidAdapter.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/sspBCBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.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/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/vidoomyBidAdapter.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/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/fledge_example.html +103 -0
- package/integrationExamples/gpt/prebidServer_fledge_example.html +111 -0
- package/libraries/ortbConverter/processors/video.js +1 -0
- package/modules/admaticBidAdapter.js +7 -2
- package/modules/adnuntiusBidAdapter.js +3 -1
- package/modules/appnexusBidAdapter.js +108 -102
- package/modules/bidwatchAnalyticsAdapter.js +2 -0
- package/modules/conversantBidAdapter.js +3 -0
- package/modules/criteoBidAdapter.js +5 -1
- package/modules/criteoIdSystem.js +27 -14
- package/modules/emtvBidAdapter.js +211 -0
- package/modules/emtvBidAdapter.md +79 -0
- package/modules/eskimiBidAdapter.js +72 -0
- package/modules/eskimiBidAdapter.md +34 -0
- package/modules/gridBidAdapter.js +42 -19
- package/modules/ixBidAdapter.js +30 -0
- package/modules/kargoBidAdapter.js +473 -246
- package/modules/kueezRtbBidAdapter.js +16 -4
- package/modules/mediasquareBidAdapter.js +2 -1
- package/modules/minutemediaplusBidAdapter.js +16 -4
- package/modules/missenaBidAdapter.js +1 -1
- package/modules/nativoBidAdapter.js +110 -21
- package/modules/neuwoRtdProvider.js +0 -2
- package/modules/nextMillenniumBidAdapter.js +2 -0
- package/modules/pairIdSystem.js +79 -0
- package/modules/pubmaticBidAdapter.js +12 -9
- package/modules/rtbhouseBidAdapter.js +3 -3
- package/modules/userId/eids.js +6 -0
- package/modules/vidoomyBidAdapter.js +30 -9
- package/modules/vidoomyBidAdapter.md +12 -2
- package/modules/yieldmoBidAdapter.js +15 -5
- package/package.json +1 -1
- package/src/config.js +78 -127
- package/test/spec/modules/1plusXRtdProvider_spec.js +8 -7
- package/test/spec/modules/adagioBidAdapter_spec.js +0 -25
- package/test/spec/modules/admaticBidAdapter_spec.js +1 -1
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +2 -1
- package/test/spec/modules/appnexusBidAdapter_spec.js +464 -448
- package/test/spec/modules/axonixBidAdapter_spec.js +0 -27
- package/test/spec/modules/big-richmediaBidAdapter_spec.js +68 -64
- package/test/spec/modules/conversantBidAdapter_spec.js +1 -0
- package/test/spec/modules/criteoBidAdapter_spec.js +33 -1
- package/test/spec/modules/criteoIdSystem_spec.js +99 -9
- package/test/spec/modules/emtvBidAdapter_spec.js +400 -0
- package/test/spec/modules/eskimiBidAdapter_spec.js +155 -0
- package/test/spec/modules/gridBidAdapter_spec.js +8 -0
- package/test/spec/modules/ixBidAdapter_spec.js +57 -0
- package/test/spec/modules/kargoBidAdapter_spec.js +297 -140
- package/test/spec/modules/kueezRtbBidAdapter_spec.js +22 -2
- package/test/spec/modules/minutemediaplusBidAdapter_spec.js +22 -2
- package/test/spec/modules/nativoBidAdapter_spec.js +101 -0
- package/test/spec/modules/neuwoRtdProvider_spec.js +0 -1
- package/test/spec/modules/ooloAnalyticsAdapter_spec.js +1 -1
- package/test/spec/modules/pairIdSystem_spec.js +68 -0
- package/test/spec/modules/pubCommonId_spec.js +0 -17
- package/test/spec/modules/pubmaticBidAdapter_spec.js +868 -867
- package/test/spec/modules/realvuAnalyticsAdapter_spec.js +0 -5
- package/test/spec/modules/rtbhouseBidAdapter_spec.js +2 -2
- package/test/spec/modules/vidoomyBidAdapter_spec.js +72 -0
- package/test/spec/modules/yieldmoBidAdapter_spec.js +19 -1
- package/test/spec/unit/pbjs_api_spec.js +19 -3
- package/test/test_index.js +13 -3
- package/dist/gridNMBidAdapter.js +0 -1
- package/modules/gridNMBidAdapter.js +0 -422
- package/modules/gridNMBidAdapter.md +0 -39
- package/test/spec/modules/gridNMBidAdapter_spec.js +0 -636
|
@@ -43,7 +43,12 @@ const BID = {
|
|
|
43
43
|
'bidderWinsCount': 1,
|
|
44
44
|
'requestId': 'b0777d85-d061-450e-9bc7-260dd54bbb7a',
|
|
45
45
|
'schain': 'a0819c69-005b-41ed-af06-1be1e0aefefc',
|
|
46
|
-
'mediaTypes': [BANNER]
|
|
46
|
+
'mediaTypes': [BANNER],
|
|
47
|
+
'ortb2Imp': {
|
|
48
|
+
'ext': {
|
|
49
|
+
'gpid': '0123456789'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
47
52
|
};
|
|
48
53
|
|
|
49
54
|
const VIDEO_BID = {
|
|
@@ -315,7 +320,8 @@ describe('KueezRtbBidAdapter', function () {
|
|
|
315
320
|
protocols: [2, 3, 5, 6],
|
|
316
321
|
startdelay: 0
|
|
317
322
|
}
|
|
318
|
-
}
|
|
323
|
+
},
|
|
324
|
+
gpid: ''
|
|
319
325
|
}
|
|
320
326
|
});
|
|
321
327
|
});
|
|
@@ -373,6 +379,7 @@ describe('KueezRtbBidAdapter', function () {
|
|
|
373
379
|
schain: BID.schain,
|
|
374
380
|
res: `${window.top.screen.width}x${window.top.screen.height}`,
|
|
375
381
|
mediaTypes: [BANNER],
|
|
382
|
+
gpid: '0123456789',
|
|
376
383
|
uqs: getTopWindowQueryParams(),
|
|
377
384
|
'ext.param1': 'loremipsum',
|
|
378
385
|
'ext.param2': 'dolorsitamet',
|
|
@@ -448,6 +455,19 @@ describe('KueezRtbBidAdapter', function () {
|
|
|
448
455
|
});
|
|
449
456
|
});
|
|
450
457
|
|
|
458
|
+
it('should get meta from response metaData', function () {
|
|
459
|
+
const serverResponse = utils.deepClone(SERVER_RESPONSE);
|
|
460
|
+
serverResponse.body.results[0].metaData = {
|
|
461
|
+
advertiserDomains: ['kueezrtb.com'],
|
|
462
|
+
agencyName: 'Agency Name',
|
|
463
|
+
};
|
|
464
|
+
const responses = adapter.interpretResponse(serverResponse, REQUEST);
|
|
465
|
+
expect(responses[0].meta).to.deep.equal({
|
|
466
|
+
advertiserDomains: ['kueezrtb.com'],
|
|
467
|
+
agencyName: 'Agency Name'
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
|
|
451
471
|
it('should return an array of interpreted video responses', function () {
|
|
452
472
|
const responses = adapter.interpretResponse(VIDEO_SERVER_RESPONSE, REQUEST);
|
|
453
473
|
expect(responses).to.have.length(1);
|
|
@@ -43,7 +43,12 @@ const BID = {
|
|
|
43
43
|
'bidderWinsCount': 1,
|
|
44
44
|
'requestId': 'b0777d85-d061-450e-9bc7-260dd54bbb7a',
|
|
45
45
|
'schain': 'a0819c69-005b-41ed-af06-1be1e0aefefc',
|
|
46
|
-
'mediaTypes': [BANNER]
|
|
46
|
+
'mediaTypes': [BANNER],
|
|
47
|
+
'ortb2Imp': {
|
|
48
|
+
'ext': {
|
|
49
|
+
'gpid': '1234567890'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
47
52
|
};
|
|
48
53
|
|
|
49
54
|
const VIDEO_BID = {
|
|
@@ -315,7 +320,8 @@ describe('MinuteMediaPlus Bid Adapter', function () {
|
|
|
315
320
|
protocols: [2, 3, 5, 6],
|
|
316
321
|
startdelay: 0
|
|
317
322
|
}
|
|
318
|
-
}
|
|
323
|
+
},
|
|
324
|
+
gpid: ''
|
|
319
325
|
}
|
|
320
326
|
});
|
|
321
327
|
});
|
|
@@ -373,6 +379,7 @@ describe('MinuteMediaPlus Bid Adapter', function () {
|
|
|
373
379
|
schain: BID.schain,
|
|
374
380
|
res: `${window.top.screen.width}x${window.top.screen.height}`,
|
|
375
381
|
mediaTypes: [BANNER],
|
|
382
|
+
gpid: '1234567890',
|
|
376
383
|
uqs: getTopWindowQueryParams(),
|
|
377
384
|
'ext.param1': 'loremipsum',
|
|
378
385
|
'ext.param2': 'dolorsitamet',
|
|
@@ -448,6 +455,19 @@ describe('MinuteMediaPlus Bid Adapter', function () {
|
|
|
448
455
|
});
|
|
449
456
|
});
|
|
450
457
|
|
|
458
|
+
it('should get meta from response metaData', function () {
|
|
459
|
+
const serverResponse = utils.deepClone(SERVER_RESPONSE);
|
|
460
|
+
serverResponse.body.results[0].metaData = {
|
|
461
|
+
advertiserDomains: ['minutemedia-prebid.com'],
|
|
462
|
+
agencyName: 'Agency Name',
|
|
463
|
+
};
|
|
464
|
+
const responses = adapter.interpretResponse(serverResponse, REQUEST);
|
|
465
|
+
expect(responses[0].meta).to.deep.equal({
|
|
466
|
+
advertiserDomains: ['minutemedia-prebid.com'],
|
|
467
|
+
agencyName: 'Agency Name'
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
|
|
451
471
|
it('should return an array of interpreted video responses', function () {
|
|
452
472
|
const responses = adapter.interpretResponse(VIDEO_SERVER_RESPONSE, REQUEST);
|
|
453
473
|
expect(responses).to.have.length(1);
|
|
@@ -8,6 +8,10 @@ import {
|
|
|
8
8
|
getPageUrlFromBidRequest,
|
|
9
9
|
hasProtocol,
|
|
10
10
|
addProtocol,
|
|
11
|
+
BidRequestDataSource,
|
|
12
|
+
RequestData,
|
|
13
|
+
UserEIDs,
|
|
14
|
+
buildRequestUrl,
|
|
11
15
|
} from '../../../modules/nativoBidAdapter'
|
|
12
16
|
|
|
13
17
|
describe('bidDataMap', function () {
|
|
@@ -120,6 +124,7 @@ describe('nativoBidAdapterTests', function () {
|
|
|
120
124
|
expect(request.url).to.be.a('string')
|
|
121
125
|
|
|
122
126
|
expect(request.url).to.include('?')
|
|
127
|
+
expect(request.url).to.include('ntv_pbv')
|
|
123
128
|
expect(request.url).to.include('ntv_ptd')
|
|
124
129
|
expect(request.url).to.include('ntv_pb_rid')
|
|
125
130
|
expect(request.url).to.include('ntv_ppc')
|
|
@@ -731,3 +736,99 @@ describe('getPageUrlFromBidRequest', () => {
|
|
|
731
736
|
expect(url).not.to.be.undefined
|
|
732
737
|
})
|
|
733
738
|
})
|
|
739
|
+
|
|
740
|
+
describe('RequestData', () => {
|
|
741
|
+
describe('addBidRequestDataSource', () => {
|
|
742
|
+
it('Adds a BidRequestDataSource', () => {
|
|
743
|
+
const requestData = new RequestData()
|
|
744
|
+
const testBidRequestDataSource = new BidRequestDataSource()
|
|
745
|
+
|
|
746
|
+
requestData.addBidRequestDataSource(testBidRequestDataSource)
|
|
747
|
+
|
|
748
|
+
expect(requestData.bidRequestDataSources.length == 1)
|
|
749
|
+
})
|
|
750
|
+
|
|
751
|
+
it("Doeasn't add a non BidRequestDataSource", () => {
|
|
752
|
+
const requestData = new RequestData()
|
|
753
|
+
|
|
754
|
+
requestData.addBidRequestDataSource({})
|
|
755
|
+
requestData.addBidRequestDataSource('test')
|
|
756
|
+
requestData.addBidRequestDataSource(1)
|
|
757
|
+
requestData.addBidRequestDataSource(true)
|
|
758
|
+
|
|
759
|
+
expect(requestData.bidRequestDataSources.length == 0)
|
|
760
|
+
})
|
|
761
|
+
})
|
|
762
|
+
|
|
763
|
+
describe('getRequestDataString', () => {
|
|
764
|
+
it("Doesn't append empty query strings", () => {
|
|
765
|
+
const requestData = new RequestData()
|
|
766
|
+
const testBidRequestDataSource = new BidRequestDataSource()
|
|
767
|
+
|
|
768
|
+
requestData.addBidRequestDataSource(testBidRequestDataSource)
|
|
769
|
+
|
|
770
|
+
let qs = requestData.getRequestDataQueryString()
|
|
771
|
+
expect(qs).to.be.empty
|
|
772
|
+
|
|
773
|
+
testBidRequestDataSource.getRequestQueryString = () => {
|
|
774
|
+
return 'ntv_test=true'
|
|
775
|
+
}
|
|
776
|
+
qs = requestData.getRequestDataQueryString()
|
|
777
|
+
expect(qs).to.be.equal('ntv_test=true')
|
|
778
|
+
})
|
|
779
|
+
})
|
|
780
|
+
})
|
|
781
|
+
|
|
782
|
+
describe('UserEIDs', () => {
|
|
783
|
+
const userEids = new UserEIDs()
|
|
784
|
+
const eids = [{ 'testId': 1111 }]
|
|
785
|
+
|
|
786
|
+
describe('processBidRequestData', () => {
|
|
787
|
+
it('Processes bid request without eids', () => {
|
|
788
|
+
userEids.processBidRequestData({})
|
|
789
|
+
|
|
790
|
+
expect(userEids.eids).to.be.empty
|
|
791
|
+
})
|
|
792
|
+
|
|
793
|
+
it('Processed bid request with eids', () => {
|
|
794
|
+
userEids.processBidRequestData({ userIdAsEids: eids })
|
|
795
|
+
|
|
796
|
+
expect(userEids.eids).to.not.be.empty
|
|
797
|
+
})
|
|
798
|
+
})
|
|
799
|
+
|
|
800
|
+
describe('getRequestQueryString', () => {
|
|
801
|
+
it('Correctly prints out QS param string', () => {
|
|
802
|
+
const qs = userEids.getRequestQueryString()
|
|
803
|
+
const value = qs.slice(11)
|
|
804
|
+
|
|
805
|
+
expect(qs).to.include('ntv_pb_eid=')
|
|
806
|
+
try {
|
|
807
|
+
expect(JSON.parse(value)).to.be.equal(eids)
|
|
808
|
+
} catch (err) { }
|
|
809
|
+
})
|
|
810
|
+
})
|
|
811
|
+
})
|
|
812
|
+
|
|
813
|
+
describe('buildRequestUrl', () => {
|
|
814
|
+
const baseUrl = 'https://www.testExchange.com'
|
|
815
|
+
it('Returns baseUrl if no QS strings passed', () => {
|
|
816
|
+
const url = buildRequestUrl(baseUrl)
|
|
817
|
+
expect(url).to.be.equal(baseUrl)
|
|
818
|
+
})
|
|
819
|
+
|
|
820
|
+
it('Returns baseUrl if empty QS strings passed', () => {
|
|
821
|
+
const url = buildRequestUrl(baseUrl, ['', '', ''])
|
|
822
|
+
expect(url).to.be.equal(baseUrl)
|
|
823
|
+
})
|
|
824
|
+
|
|
825
|
+
it('Returns baseUrl + QS params if QS strings passed', () => {
|
|
826
|
+
const url = buildRequestUrl(baseUrl, ['ntv_ptd=123456&ntv_test=true', 'ntv_foo=bar'])
|
|
827
|
+
expect(url).to.be.equal(`${baseUrl}?ntv_ptd=123456&ntv_test=true&ntv_foo=bar`)
|
|
828
|
+
})
|
|
829
|
+
|
|
830
|
+
it('Returns baseUrl + QS params if mixed QS strings passed', () => {
|
|
831
|
+
const url = buildRequestUrl(baseUrl, ['ntv_ptd=123456&ntv_test=true', '', '', 'ntv_foo=bar'])
|
|
832
|
+
expect(url).to.be.equal(`${baseUrl}?ntv_ptd=123456&ntv_test=true&ntv_foo=bar`)
|
|
833
|
+
})
|
|
834
|
+
})
|
|
@@ -60,7 +60,6 @@ describe('neuwoRtdProvider', function () {
|
|
|
60
60
|
neuwo.injectTopics(topics, bidsConfig, () => { })
|
|
61
61
|
expect(bidsConfig.ortb2Fragments.global.site.content.data[0].name, 'name of first content data object').to.equal(neuwo.DATA_PROVIDER)
|
|
62
62
|
expect(bidsConfig.ortb2Fragments.global.site.content.data[0].segment[0].id, 'id of first segment in content.data').to.equal(TAX_ID)
|
|
63
|
-
expect(bidsConfig.ortb2Fragments.global.site.cattax, 'category taxonomy code for pagecat').to.equal(6) // CATTAX_IAB
|
|
64
63
|
expect(bidsConfig.ortb2Fragments.global.site.pagecat[0], 'category taxonomy code for pagecat').to.equal(TAX_ID)
|
|
65
64
|
})
|
|
66
65
|
|
|
@@ -194,7 +194,7 @@ describe('oolo Prebid Analytic', () => {
|
|
|
194
194
|
})
|
|
195
195
|
|
|
196
196
|
const conf = {}
|
|
197
|
-
const pbjsConfig = config.getConfig()
|
|
197
|
+
const pbjsConfig = JSON.parse(JSON.stringify(config.getConfig()))
|
|
198
198
|
|
|
199
199
|
Object.keys(pbjsConfig).forEach(key => {
|
|
200
200
|
if (key[0] !== '_') {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { storage, pairIdSubmodule } from 'modules/pairIdSystem.js';
|
|
2
|
+
import * as utils from 'src/utils.js';
|
|
3
|
+
|
|
4
|
+
describe('pairId', function () {
|
|
5
|
+
let sandbox;
|
|
6
|
+
let logErrorStub;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
sandbox = sinon.sandbox.create();
|
|
10
|
+
logErrorStub = sandbox.stub(utils, 'logError');
|
|
11
|
+
});
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
sandbox.restore();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('should log an error if no ID is found when getId', function() {
|
|
17
|
+
pairIdSubmodule.getId({ params: {} });
|
|
18
|
+
expect(logErrorStub.calledOnce).to.be.true;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should read pairId from local storage if exists', function() {
|
|
22
|
+
let pairIds = ['test-pair-id1', 'test-pair-id2', 'test-pair-id3'];
|
|
23
|
+
sandbox.stub(storage, 'getDataFromLocalStorage').withArgs('pairId').returns(btoa(JSON.stringify(pairIds)));
|
|
24
|
+
|
|
25
|
+
let id = pairIdSubmodule.getId({ params: {} });
|
|
26
|
+
expect(id).to.be.deep.equal({id: pairIds});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('should read pairId from cookie if exists', function() {
|
|
30
|
+
let pairIds = ['test-pair-id4', 'test-pair-id5', 'test-pair-id6'];
|
|
31
|
+
sandbox.stub(storage, 'getCookie').withArgs('pairId').returns(btoa(JSON.stringify(pairIds)));
|
|
32
|
+
|
|
33
|
+
let id = pairIdSubmodule.getId({ params: {} });
|
|
34
|
+
expect(id).to.be.deep.equal({id: pairIds});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('should read pairId from default liveramp envelope local storage key if configured', function() {
|
|
38
|
+
let pairIds = ['test-pair-id1', 'test-pair-id2', 'test-pair-id3'];
|
|
39
|
+
sandbox.stub(storage, 'getDataFromLocalStorage').withArgs('_lr_pairId').returns(btoa(JSON.stringify({'envelope': pairIds})));
|
|
40
|
+
let id = pairIdSubmodule.getId({
|
|
41
|
+
params: {
|
|
42
|
+
liveramp: {}
|
|
43
|
+
}})
|
|
44
|
+
expect(id).to.be.deep.equal({id: pairIds})
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
it('should read pairId from default liveramp envelope cookie entry if configured', function() {
|
|
48
|
+
let pairIds = ['test-pair-id4', 'test-pair-id5', 'test-pair-id6'];
|
|
49
|
+
sandbox.stub(storage, 'getDataFromLocalStorage').withArgs('_lr_pairId').returns(btoa(JSON.stringify({'envelope': pairIds})));
|
|
50
|
+
let id = pairIdSubmodule.getId({
|
|
51
|
+
params: {
|
|
52
|
+
liveramp: {}
|
|
53
|
+
}})
|
|
54
|
+
expect(id).to.be.deep.equal({id: pairIds})
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
it('should read pairId from specified liveramp envelope cookie entry if configured with storageKey', function() {
|
|
58
|
+
let pairIds = ['test-pair-id7', 'test-pair-id8', 'test-pair-id9'];
|
|
59
|
+
sandbox.stub(storage, 'getDataFromLocalStorage').withArgs('lr_pairId_custom').returns(btoa(JSON.stringify({'envelope': pairIds})));
|
|
60
|
+
let id = pairIdSubmodule.getId({
|
|
61
|
+
params: {
|
|
62
|
+
liveramp: {
|
|
63
|
+
storageKey: 'lr_pairId_custom'
|
|
64
|
+
}
|
|
65
|
+
}})
|
|
66
|
+
expect(id).to.be.deep.equal({id: pairIds})
|
|
67
|
+
})
|
|
68
|
+
});
|
|
@@ -233,23 +233,6 @@ describe('Publisher Common ID', function () {
|
|
|
233
233
|
});
|
|
234
234
|
});
|
|
235
235
|
});
|
|
236
|
-
|
|
237
|
-
it.skip('disable auto create', function() {
|
|
238
|
-
setConfig({
|
|
239
|
-
create: false
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
const config = getPubcidConfig();
|
|
243
|
-
expect(config.create).to.be.false;
|
|
244
|
-
expect(config.typeEnabled).to.equal('html5');
|
|
245
|
-
|
|
246
|
-
let adUnits = getAdUnits();
|
|
247
|
-
let innerAdUnits;
|
|
248
|
-
requestBidHook((config) => { innerAdUnits = config.adUnits }, {adUnits});
|
|
249
|
-
|
|
250
|
-
const pubcid = localStorage.getItem(ID_NAME);
|
|
251
|
-
expect(pubcid).to.be.null;
|
|
252
|
-
});
|
|
253
236
|
});
|
|
254
237
|
|
|
255
238
|
describe('Invoking requestBid', function () {
|