prebid.js 7.49.0 → 7.51.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/adhashBidAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/admanBidAdapter.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.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/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/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.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/cleanioRtdProvider.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/confiantRtdProvider.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/cwireBidAdapter.js +1 -1
- package/dist/dependencies.json +3 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- 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/greenbidsRtdProvider.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/liveIntentIdSystem.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/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +140 -139
- 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/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidServerBidAdapter.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/retailspotBidAdapter.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/silverpushBidAdapter.js +1 -0
- 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/vidazooBidAdapter.js +1 -1
- package/dist/video.js +1 -1
- package/dist/videoModule.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/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/videoModule/eventsUI/eventsUI.css +205 -0
- package/integrationExamples/videoModule/eventsUI/eventsUI.js +181 -0
- package/integrationExamples/videoModule/jwplayer/eventsUI.html +295 -0
- package/integrationExamples/videoModule/videojs/eventsUI.html +319 -0
- package/libraries/video/shared/helpers.js +14 -0
- package/modules/33acrossBidAdapter.js +1 -1
- package/modules/adhashBidAdapter.js +28 -17
- package/modules/adkernelBidAdapter.js +2 -1
- package/modules/admanBidAdapter.js +30 -22
- package/modules/adnuntiusBidAdapter.js +98 -79
- package/modules/adnuntiusBidAdapter.md +2 -1
- package/modules/adqueryBidAdapter.js +7 -1
- package/modules/adrinoBidAdapter.js +1 -0
- package/modules/adtelligentBidAdapter.js +4 -2
- package/modules/appnexusBidAdapter.js +2 -0
- package/modules/beopBidAdapter.js +1 -0
- package/modules/cleanioRtdProvider.js +2 -4
- package/modules/confiantRtdProvider.js +15 -12
- package/modules/conversantAnalyticsAdapter.js +7 -5
- package/modules/conversantBidAdapter.js +1 -1
- package/modules/criteoBidAdapter.js +58 -4
- package/modules/freewheel-sspBidAdapter.js +10 -2
- package/modules/gridBidAdapter.js +3 -0
- package/modules/gumgumBidAdapter.js +5 -0
- package/modules/liveIntentIdSystem.js +8 -4
- package/modules/magniteAnalyticsAdapter.js +26 -3
- package/modules/minutemediaBidAdapter.js +13 -3
- package/modules/permutiveRtdProvider.js +9 -38
- package/modules/prebidServerBidAdapter/index.js +7 -8
- package/modules/pubmaticBidAdapter.js +1 -0
- package/modules/riseBidAdapter.js +13 -3
- package/modules/rtbhouseBidAdapter.md +24 -0
- package/modules/rubiconBidAdapter.js +6 -2
- package/modules/silverpushBidAdapter.js +326 -0
- package/modules/silverpushBidAdapter.md +107 -0
- package/modules/underdogmediaBidAdapter.js +2 -2
- package/modules/videoModule/adQueue.js +2 -2
- package/modules/videoModule/index.js +9 -5
- package/modules/yahoosspBidAdapter.js +6 -0
- package/modules/yahoosspBidAdapter.md +37 -0
- package/package.json +1 -1
- package/src/adloader.js +2 -1
- package/src/native.js +20 -4
- package/test/spec/modules/33acrossBidAdapter_spec.js +4 -3
- package/test/spec/modules/adhashBidAdapter_spec.js +51 -1
- package/test/spec/modules/admanBidAdapter_spec.js +1 -2
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +535 -264
- package/test/spec/modules/adqueryBidAdapter_spec.js +9 -0
- package/test/spec/modules/adrinoBidAdapter_spec.js +4 -0
- package/test/spec/modules/adtelligentBidAdapter_spec.js +1 -0
- package/test/spec/modules/beopBidAdapter_spec.js +4 -0
- package/test/spec/modules/cleanioRtdProvider_spec.js +7 -8
- package/test/spec/modules/confiantRtdProvider_spec.js +4 -1
- package/test/spec/modules/conversantBidAdapter_spec.js +2 -1
- package/test/spec/modules/criteoBidAdapter_spec.js +159 -2
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +5 -2
- package/test/spec/modules/gridBidAdapter_spec.js +3 -0
- package/test/spec/modules/gumgumBidAdapter_spec.js +14 -0
- package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +28 -0
- package/test/spec/modules/liveIntentIdSystem_spec.js +45 -0
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +16 -36
- package/test/spec/modules/mass_spec.js +2 -0
- package/test/spec/modules/minutemediaBidAdapter_spec.js +69 -1
- package/test/spec/modules/permutiveRtdProvider_spec.js +0 -20
- package/test/spec/modules/prebidServerBidAdapter_spec.js +3 -1
- package/test/spec/modules/pubmaticBidAdapter_spec.js +7 -0
- package/test/spec/modules/riseBidAdapter_spec.js +69 -1
- package/test/spec/modules/rubiconBidAdapter_spec.js +143 -67
- package/test/spec/modules/silverpushBidAdapter_spec.js +394 -0
- package/test/spec/modules/underdogmediaBidAdapter_spec.js +1 -1
- package/test/spec/modules/videoModule/shared/helpers_spec.js +22 -0
- package/test/spec/modules/yahoosspBidAdapter_spec.js +60 -1
- package/test/spec/native_spec.js +12 -12
|
@@ -119,6 +119,15 @@ describe('adqueryBidAdapter', function () {
|
|
|
119
119
|
it('should include sizes', function () {
|
|
120
120
|
expect(rdata.sizes).not.be.null
|
|
121
121
|
})
|
|
122
|
+
|
|
123
|
+
it('should include version', function () {
|
|
124
|
+
expect(rdata.v).not.be.null
|
|
125
|
+
expect(rdata.v).equal('$prebid.version$')
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
it('should include referrer', function () {
|
|
129
|
+
expect(rdata.bidPageUrl).not.be.null
|
|
130
|
+
})
|
|
122
131
|
})
|
|
123
132
|
|
|
124
133
|
describe('interpretResponse', function () {
|
|
@@ -81,6 +81,7 @@ describe('adrinoBidAdapter', function () {
|
|
|
81
81
|
expect(result.length).to.equal(1);
|
|
82
82
|
expect(result[0].method).to.equal('POST');
|
|
83
83
|
expect(result[0].url).to.equal('https://prd-prebid-bidder.adrino.io/bidder/bids/');
|
|
84
|
+
expect(result[0].data[0].adUnitCode).to.equal('adunit-code-2');
|
|
84
85
|
expect(result[0].data[0].bidId).to.equal('12345678901234');
|
|
85
86
|
expect(result[0].data[0].placementHash).to.equal('abcdef123456');
|
|
86
87
|
expect(result[0].data[0].referer).to.equal('http://example.com/');
|
|
@@ -135,6 +136,7 @@ describe('adrinoBidAdapter', function () {
|
|
|
135
136
|
expect(result.length).to.equal(1);
|
|
136
137
|
expect(result[0].method).to.equal('POST');
|
|
137
138
|
expect(result[0].url).to.equal('https://stg-prebid-bidder.adrino.io/bidder/bids/');
|
|
139
|
+
expect(result[0].data[0].adUnitCode).to.equal('adunit-code');
|
|
138
140
|
expect(result[0].data[0].bidId).to.equal('12345678901234');
|
|
139
141
|
expect(result[0].data[0].placementHash).to.equal('abcdef123456');
|
|
140
142
|
expect(result[0].data[0].referer).to.equal('http://example.com/');
|
|
@@ -154,6 +156,7 @@ describe('adrinoBidAdapter', function () {
|
|
|
154
156
|
expect(result.length).to.equal(1);
|
|
155
157
|
expect(result[0].method).to.equal('POST');
|
|
156
158
|
expect(result[0].url).to.equal('https://prd-prebid-bidder.adrino.io/bidder/bids/');
|
|
159
|
+
expect(result[0].data[0].adUnitCode).to.equal('adunit-code');
|
|
157
160
|
expect(result[0].data[0].bidId).to.equal('12345678901234');
|
|
158
161
|
expect(result[0].data[0].placementHash).to.equal('abcdef123456');
|
|
159
162
|
expect(result[0].data[0].referer).to.equal('http://example.com/');
|
|
@@ -173,6 +176,7 @@ describe('adrinoBidAdapter', function () {
|
|
|
173
176
|
expect(result.length).to.equal(1);
|
|
174
177
|
expect(result[0].method).to.equal('POST');
|
|
175
178
|
expect(result[0].url).to.equal('https://prd-prebid-bidder.adrino.io/bidder/bids/');
|
|
179
|
+
expect(result[0].data[0].adUnitCode).to.equal('adunit-code');
|
|
176
180
|
expect(result[0].data[0].bidId).to.equal('12345678901234');
|
|
177
181
|
expect(result[0].data[0].placementHash).to.equal('abcdef123456');
|
|
178
182
|
expect(result[0].data[0].referer).to.equal('http://example.com/');
|
|
@@ -22,6 +22,7 @@ const aliasEP = {
|
|
|
22
22
|
'ocm': 'https://ghb.cenarius.orangeclickmedia.com/v2/auction/',
|
|
23
23
|
'vidcrunchllc': 'https://ghb.platform.vidcrunch.com/v2/auction/',
|
|
24
24
|
'9dotsmedia': 'https://ghb.platform.audiodots.com/v2/auction/',
|
|
25
|
+
'copper6': 'https://ghb.app.copper6.com/v2/auction/',
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
const DEFAULT_ADATPER_REQ = { bidderCode: 'adtelligent' };
|
|
@@ -99,6 +99,8 @@ describe('BeOp Bid Adapter tests', () => {
|
|
|
99
99
|
expect(url).to.equal(ENDPOINT);
|
|
100
100
|
expect(payload.pid).to.exist;
|
|
101
101
|
expect(payload.pid).to.equal('5a8af500c9e77c00017e4cad');
|
|
102
|
+
expect(payload.gdpr_applies).to.exist;
|
|
103
|
+
expect(payload.gdpr_applies).to.equals(false);
|
|
102
104
|
expect(payload.slts[0].name).to.exist;
|
|
103
105
|
expect(payload.slts[0].name).to.equal('bellow-article');
|
|
104
106
|
expect(payload.slts[0].flr).to.equal(10);
|
|
@@ -121,6 +123,8 @@ describe('BeOp Bid Adapter tests', () => {
|
|
|
121
123
|
|
|
122
124
|
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
123
125
|
const payload = JSON.parse(request.data);
|
|
126
|
+
expect(payload.gdpr_applies).to.exist;
|
|
127
|
+
expect(payload.gdpr_applies).to.equals(true);
|
|
124
128
|
expect(payload.tc_string).to.exist;
|
|
125
129
|
expect(payload.tc_string).to.equal('BOJ8RZsOJ8RZsABAB8AAAAAZ+A==');
|
|
126
130
|
expect(payload.url).to.exist;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadExternalScriptStub } from 'test/mocks/adloaderStub.js';
|
|
1
2
|
import * as utils from '../../../src/utils.js';
|
|
2
3
|
import * as hook from '../../../src/hook.js'
|
|
3
4
|
import * as events from '../../../src/events.js';
|
|
@@ -68,10 +69,8 @@ describe('clean.io RTD module', function () {
|
|
|
68
69
|
it('pageInitStepProtectPage() should insert script element', function() {
|
|
69
70
|
pageInitStepProtectPage(fakeScriptURL);
|
|
70
71
|
|
|
71
|
-
sinon.assert.calledOnce(
|
|
72
|
-
sinon.assert.calledWith(
|
|
73
|
-
sinon.assert.calledWith(insertElementStub, sinon.match(elem => elem.type === 'text/javascript'));
|
|
74
|
-
sinon.assert.calledWith(insertElementStub, sinon.match(elem => elem.src === fakeScriptURL));
|
|
72
|
+
sinon.assert.calledOnce(loadExternalScriptStub);
|
|
73
|
+
sinon.assert.calledWith(loadExternalScriptStub, fakeScriptURL, 'clean.io');
|
|
75
74
|
});
|
|
76
75
|
});
|
|
77
76
|
|
|
@@ -133,14 +132,14 @@ describe('clean.io RTD module', function () {
|
|
|
133
132
|
it('should refuse initialization with incorrect parameters', function () {
|
|
134
133
|
const { init } = getModule();
|
|
135
134
|
expect(init({ params: { cdnUrl: 'abc', protectionMode: 'full' } }, {})).to.equal(false); // too short distribution name
|
|
136
|
-
sinon.assert.notCalled(
|
|
135
|
+
sinon.assert.notCalled(loadExternalScriptStub);
|
|
137
136
|
});
|
|
138
137
|
|
|
139
|
-
it('should
|
|
138
|
+
it('should initialize in full (page) protection mode', function () {
|
|
140
139
|
const { init, onBidResponseEvent } = getModule();
|
|
141
140
|
expect(init({ params: { cdnUrl: 'https://abc1234567890.cloudfront.net/script.js', protectionMode: 'full' } }, {})).to.equal(true);
|
|
142
|
-
sinon.assert.calledOnce(
|
|
143
|
-
sinon.assert.calledWith(
|
|
141
|
+
sinon.assert.calledOnce(loadExternalScriptStub);
|
|
142
|
+
sinon.assert.calledWith(loadExternalScriptStub, 'https://abc1234567890.cloudfront.net/script.js', 'clean.io');
|
|
144
143
|
|
|
145
144
|
const fakeBidResponse = makeFakeBidResponse();
|
|
146
145
|
onBidResponseEvent(fakeBidResponse, {}, {});
|
|
@@ -46,6 +46,7 @@ describe('Confiant RTD module', function () {
|
|
|
46
46
|
let listenerCallback;
|
|
47
47
|
const mockWindow = { addEventListener: (a, cb) => (listenerCallback = cb) };
|
|
48
48
|
let billableEventsCounter = 0;
|
|
49
|
+
const propertyId = 'fff';
|
|
49
50
|
|
|
50
51
|
events.on(CONSTANTS.EVENTS.BILLABLE_EVENT, (e) => {
|
|
51
52
|
if (e.vendor === 'confiant') {
|
|
@@ -57,15 +58,17 @@ describe('Confiant RTD module', function () {
|
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
60
|
|
|
60
|
-
subscribeToConfiantCommFrame(mockWindow);
|
|
61
|
+
subscribeToConfiantCommFrame(mockWindow, propertyId);
|
|
61
62
|
listenerCallback({
|
|
62
63
|
data: {
|
|
64
|
+
type: 'cnft:reportBillableEvent:' + propertyId,
|
|
63
65
|
auctionId: 'auctionId',
|
|
64
66
|
transactionId: 'transactionId'
|
|
65
67
|
}
|
|
66
68
|
});
|
|
67
69
|
listenerCallback({
|
|
68
70
|
data: {
|
|
71
|
+
type: 'cnft:reportBillableEvent:' + propertyId,
|
|
69
72
|
auctionId: 'auctionId',
|
|
70
73
|
transactionId: 'transactionId'
|
|
71
74
|
}
|
|
@@ -221,8 +221,9 @@ describe('Conversant adapter tests', function() {
|
|
|
221
221
|
|
|
222
222
|
it('Verify basic properties', function() {
|
|
223
223
|
expect(spec.code).to.equal('conversant');
|
|
224
|
-
expect(spec.aliases).to.be.an('array').with.lengthOf(
|
|
224
|
+
expect(spec.aliases).to.be.an('array').with.lengthOf(2);
|
|
225
225
|
expect(spec.aliases[0]).to.equal('cnvr');
|
|
226
|
+
expect(spec.aliases[1]).to.equal('epsilon');
|
|
226
227
|
expect(spec.supportedMediaTypes).to.be.an('array').with.lengthOf(2);
|
|
227
228
|
expect(spec.supportedMediaTypes[1]).to.equal('video');
|
|
228
229
|
});
|
|
@@ -304,7 +304,8 @@ describe('The Criteo bidding adapter', function () {
|
|
|
304
304
|
placement: 1,
|
|
305
305
|
minduration: 0,
|
|
306
306
|
playbackmethod: 1,
|
|
307
|
-
startdelay: 0
|
|
307
|
+
startdelay: 0,
|
|
308
|
+
plcmt: 1
|
|
308
309
|
}
|
|
309
310
|
},
|
|
310
311
|
params: {
|
|
@@ -710,6 +711,42 @@ describe('The Criteo bidding adapter', function () {
|
|
|
710
711
|
expect(ortbRequest.slots[0].native).to.equal(true);
|
|
711
712
|
});
|
|
712
713
|
|
|
714
|
+
it('should properly forward eids', function () {
|
|
715
|
+
const bidRequests = [
|
|
716
|
+
{
|
|
717
|
+
bidder: 'criteo',
|
|
718
|
+
adUnitCode: 'bid-123',
|
|
719
|
+
transactionId: 'transaction-123',
|
|
720
|
+
mediaTypes: {
|
|
721
|
+
banner: {
|
|
722
|
+
sizes: [[728, 90]]
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
userIdAsEids: [
|
|
726
|
+
{
|
|
727
|
+
source: 'criteo.com',
|
|
728
|
+
uids: [{
|
|
729
|
+
id: 'abc',
|
|
730
|
+
atype: 1
|
|
731
|
+
}]
|
|
732
|
+
}
|
|
733
|
+
],
|
|
734
|
+
params: {}
|
|
735
|
+
},
|
|
736
|
+
];
|
|
737
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
738
|
+
const ortbRequest = request.data;
|
|
739
|
+
expect(ortbRequest.user.ext.eids).to.deep.equal([
|
|
740
|
+
{
|
|
741
|
+
source: 'criteo.com',
|
|
742
|
+
uids: [{
|
|
743
|
+
id: 'abc',
|
|
744
|
+
atype: 1
|
|
745
|
+
}]
|
|
746
|
+
}
|
|
747
|
+
]);
|
|
748
|
+
});
|
|
749
|
+
|
|
713
750
|
it('should properly detect and forward native flag', function () {
|
|
714
751
|
const bidRequests = [
|
|
715
752
|
{
|
|
@@ -1063,7 +1100,8 @@ describe('The Criteo bidding adapter', function () {
|
|
|
1063
1100
|
mimes: ['video/mp4', 'video/x-flv'],
|
|
1064
1101
|
maxduration: 30,
|
|
1065
1102
|
api: [1, 2],
|
|
1066
|
-
protocols: [2, 3]
|
|
1103
|
+
protocols: [2, 3],
|
|
1104
|
+
plcmt: 3
|
|
1067
1105
|
}
|
|
1068
1106
|
},
|
|
1069
1107
|
params: {
|
|
@@ -1093,6 +1131,7 @@ describe('The Criteo bidding adapter', function () {
|
|
|
1093
1131
|
expect(ortbRequest.slots[0].video.startdelay).to.equal(5);
|
|
1094
1132
|
expect(ortbRequest.slots[0].video.playbackmethod).to.deep.equal([1, 3]);
|
|
1095
1133
|
expect(ortbRequest.slots[0].video.placement).to.equal(2);
|
|
1134
|
+
expect(ortbRequest.slots[0].video.plcmt).to.equal(3);
|
|
1096
1135
|
});
|
|
1097
1136
|
|
|
1098
1137
|
it('should properly build a video request with more than one player size', function () {
|
|
@@ -1543,6 +1582,73 @@ describe('The Criteo bidding adapter', function () {
|
|
|
1543
1582
|
}
|
|
1544
1583
|
});
|
|
1545
1584
|
});
|
|
1585
|
+
|
|
1586
|
+
it('should properly build a request when imp.rwdd is present', function () {
|
|
1587
|
+
const bidderRequest = {};
|
|
1588
|
+
const bidRequests = [
|
|
1589
|
+
{
|
|
1590
|
+
bidder: 'criteo',
|
|
1591
|
+
adUnitCode: 'bid-123',
|
|
1592
|
+
transactionId: 'transaction-123',
|
|
1593
|
+
mediaTypes: {
|
|
1594
|
+
banner: {
|
|
1595
|
+
sizes: [[728, 90]]
|
|
1596
|
+
}
|
|
1597
|
+
},
|
|
1598
|
+
params: {
|
|
1599
|
+
zoneId: 123,
|
|
1600
|
+
ext: {
|
|
1601
|
+
bidfloor: 0.75
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
ortb2Imp: {
|
|
1605
|
+
rwdd: 1,
|
|
1606
|
+
ext: {
|
|
1607
|
+
data: {
|
|
1608
|
+
someContextAttribute: 'abc'
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
},
|
|
1613
|
+
];
|
|
1614
|
+
|
|
1615
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
1616
|
+
expect(request.data.slots[0].rwdd).to.be.not.null;
|
|
1617
|
+
expect(request.data.slots[0].rwdd).to.equal(1);
|
|
1618
|
+
});
|
|
1619
|
+
|
|
1620
|
+
it('should properly build a request when imp.rwdd is false', function () {
|
|
1621
|
+
const bidderRequest = {};
|
|
1622
|
+
const bidRequests = [
|
|
1623
|
+
{
|
|
1624
|
+
bidder: 'criteo',
|
|
1625
|
+
adUnitCode: 'bid-123',
|
|
1626
|
+
transactionId: 'transaction-123',
|
|
1627
|
+
mediaTypes: {
|
|
1628
|
+
banner: {
|
|
1629
|
+
sizes: [[728, 90]]
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
params: {
|
|
1633
|
+
zoneId: 123,
|
|
1634
|
+
ext: {
|
|
1635
|
+
bidfloor: 0.75
|
|
1636
|
+
}
|
|
1637
|
+
},
|
|
1638
|
+
ortb2Imp: {
|
|
1639
|
+
rwdd: 0,
|
|
1640
|
+
ext: {
|
|
1641
|
+
data: {
|
|
1642
|
+
someContextAttribute: 'abc'
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
},
|
|
1647
|
+
];
|
|
1648
|
+
|
|
1649
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
1650
|
+
expect(request.data.slots[0].rwdd).to.be.undefined;
|
|
1651
|
+
});
|
|
1546
1652
|
});
|
|
1547
1653
|
|
|
1548
1654
|
describe('interpretResponse', function () {
|
|
@@ -1565,6 +1671,11 @@ describe('The Criteo bidding adapter', function () {
|
|
|
1565
1671
|
height: 90,
|
|
1566
1672
|
deal: 'myDealCode',
|
|
1567
1673
|
adomain: ['criteo.com'],
|
|
1674
|
+
ext: {
|
|
1675
|
+
meta: {
|
|
1676
|
+
networkName: 'Criteo'
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1568
1679
|
}],
|
|
1569
1680
|
},
|
|
1570
1681
|
};
|
|
@@ -1587,6 +1698,7 @@ describe('The Criteo bidding adapter', function () {
|
|
|
1587
1698
|
expect(bids[0].height).to.equal(90);
|
|
1588
1699
|
expect(bids[0].dealId).to.equal('myDealCode');
|
|
1589
1700
|
expect(bids[0].meta.advertiserDomains[0]).to.equal('criteo.com');
|
|
1701
|
+
expect(bids[0].meta.networkName).to.equal('Criteo');
|
|
1590
1702
|
});
|
|
1591
1703
|
|
|
1592
1704
|
it('should properly parse a bid response with a zoneId', function () {
|
|
@@ -1653,6 +1765,51 @@ describe('The Criteo bidding adapter', function () {
|
|
|
1653
1765
|
expect(bids[0].mediaType).to.equal(VIDEO);
|
|
1654
1766
|
});
|
|
1655
1767
|
|
|
1768
|
+
it('should properly parse a bid response with a outstream video', function () {
|
|
1769
|
+
const response = {
|
|
1770
|
+
body: {
|
|
1771
|
+
slots: [{
|
|
1772
|
+
impid: 'test-requestId',
|
|
1773
|
+
bidId: 'abc123',
|
|
1774
|
+
cpm: 1.23,
|
|
1775
|
+
displayurl: 'http://test-ad',
|
|
1776
|
+
width: 728,
|
|
1777
|
+
height: 90,
|
|
1778
|
+
zoneid: 123,
|
|
1779
|
+
video: true,
|
|
1780
|
+
ext: {
|
|
1781
|
+
videoPlayerType: 'RadiantMediaPlayer',
|
|
1782
|
+
videoPlayerConfig: {
|
|
1783
|
+
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
}],
|
|
1787
|
+
},
|
|
1788
|
+
};
|
|
1789
|
+
const request = {
|
|
1790
|
+
bidRequests: [{
|
|
1791
|
+
adUnitCode: 'test-requestId',
|
|
1792
|
+
bidId: 'test-bidId',
|
|
1793
|
+
params: {
|
|
1794
|
+
zoneId: 123,
|
|
1795
|
+
},
|
|
1796
|
+
mediaTypes: {
|
|
1797
|
+
video: {
|
|
1798
|
+
context: 'outstream'
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
}]
|
|
1802
|
+
};
|
|
1803
|
+
const bids = spec.interpretResponse(response, request);
|
|
1804
|
+
expect(bids).to.have.lengthOf(1);
|
|
1805
|
+
expect(bids[0].requestId).to.equal('test-bidId');
|
|
1806
|
+
expect(bids[0].cpm).to.equal(1.23);
|
|
1807
|
+
expect(bids[0].vastUrl).to.equal('http://test-ad');
|
|
1808
|
+
expect(bids[0].renderer.url).to.equal('https://static.criteo.net/js/ld/publishertag.renderer.js');
|
|
1809
|
+
expect(typeof bids[0].renderer.config.documentResolver).to.equal('function');
|
|
1810
|
+
expect(typeof bids[0].renderer._render).to.equal('function');
|
|
1811
|
+
});
|
|
1812
|
+
|
|
1656
1813
|
it('should properly parse a bid response with native', function () {
|
|
1657
1814
|
const response = {
|
|
1658
1815
|
body: {
|
|
@@ -284,8 +284,9 @@ describe('freewheelSSP BidAdapter Test', () => {
|
|
|
284
284
|
it('should return context and placement with default values', () => {
|
|
285
285
|
const request = spec.buildRequests(bidRequests);
|
|
286
286
|
const payload = request[0].data;
|
|
287
|
-
expect(payload.video_context).to.equal('
|
|
288
|
-
expect(payload.video_placement).to.equal(
|
|
287
|
+
expect(payload.video_context).to.equal(''); ;
|
|
288
|
+
expect(payload.video_placement).to.equal(null);
|
|
289
|
+
expect(payload.video_plcmt).to.equal(null);
|
|
289
290
|
});
|
|
290
291
|
|
|
291
292
|
it('should add parameters to the tag', () => {
|
|
@@ -367,6 +368,7 @@ describe('freewheelSSP BidAdapter Test', () => {
|
|
|
367
368
|
'video': {
|
|
368
369
|
'context': 'outstream',
|
|
369
370
|
'placement': 2,
|
|
371
|
+
'plcmt': 3,
|
|
370
372
|
'playerSize': [300, 600],
|
|
371
373
|
}
|
|
372
374
|
},
|
|
@@ -382,6 +384,7 @@ describe('freewheelSSP BidAdapter Test', () => {
|
|
|
382
384
|
const payload = request[0].data;
|
|
383
385
|
expect(payload.video_context).to.equal('outstream'); ;
|
|
384
386
|
expect(payload.video_placement).to.equal(2);
|
|
387
|
+
expect(payload.video_plcmt).to.equal(3);
|
|
385
388
|
});
|
|
386
389
|
})
|
|
387
390
|
|
|
@@ -423,6 +423,7 @@ describe('TheMediaGrid Adapter', function () {
|
|
|
423
423
|
api: [1, 2],
|
|
424
424
|
skip: 1,
|
|
425
425
|
placement: 1,
|
|
426
|
+
plcmt: 2,
|
|
426
427
|
minduration: 0,
|
|
427
428
|
playbackmethod: 1,
|
|
428
429
|
startdelay: 0
|
|
@@ -486,6 +487,7 @@ describe('TheMediaGrid Adapter', function () {
|
|
|
486
487
|
'api': [1, 2],
|
|
487
488
|
'skip': 1,
|
|
488
489
|
'placement': 1,
|
|
490
|
+
'plcmt': 2,
|
|
489
491
|
'playbackmethod': 1,
|
|
490
492
|
'startdelay': 0
|
|
491
493
|
}
|
|
@@ -539,6 +541,7 @@ describe('TheMediaGrid Adapter', function () {
|
|
|
539
541
|
],
|
|
540
542
|
'minduration': 0,
|
|
541
543
|
'placement': 1,
|
|
544
|
+
'plcmt': 2,
|
|
542
545
|
'playbackmethod': 1,
|
|
543
546
|
'playersizes': [
|
|
544
547
|
'400x600'
|
|
@@ -111,6 +111,14 @@ describe('gumgumAdapter', function () {
|
|
|
111
111
|
sizes: sizesArray
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
|
+
userId: {
|
|
115
|
+
id5id: {
|
|
116
|
+
uid: 'uid-string',
|
|
117
|
+
ext: {
|
|
118
|
+
linkType: 2
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
114
122
|
adUnitCode: 'adunit-code',
|
|
115
123
|
sizes: sizesArray,
|
|
116
124
|
bidId: '30b31c1838de1e',
|
|
@@ -158,6 +166,12 @@ describe('gumgumAdapter', function () {
|
|
|
158
166
|
const bidRequest = spec.buildRequests([request])[0];
|
|
159
167
|
expect(bidRequest.data.aun).to.equal(bidRequests[0].adUnitCode);
|
|
160
168
|
});
|
|
169
|
+
it('should set id5Id and id5IdLinkType if the uid and linkType are available', function () {
|
|
170
|
+
const request = { ...bidRequests[0] };
|
|
171
|
+
const bidRequest = spec.buildRequests([request])[0];
|
|
172
|
+
expect(bidRequest.data.id5Id).to.equal(bidRequests[0].userId.id5id.uid);
|
|
173
|
+
expect(bidRequest.data.id5IdLinkType).to.equal(bidRequests[0].userId.id5id.ext.linkType);
|
|
174
|
+
});
|
|
161
175
|
|
|
162
176
|
it('should set pubId param if found', function () {
|
|
163
177
|
const request = { ...bidRequests[0], params: pubIdParam };
|
|
@@ -73,6 +73,34 @@ describe('LiveIntentMinimalId', function() {
|
|
|
73
73
|
expect(callBackSpy.calledOnce).to.be.true;
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
+
it('should call the Identity Exchange endpoint with the privided distributorId', function() {
|
|
77
|
+
getCookieStub.returns(null);
|
|
78
|
+
let callBackSpy = sinon.spy();
|
|
79
|
+
let submoduleCallback = liveIntentIdSubmodule.getId({ params: { fireEventDelay: 1, distributorId: 'did-1111' } }).callback;
|
|
80
|
+
submoduleCallback(callBackSpy);
|
|
81
|
+
let request = server.requests[0];
|
|
82
|
+
expect(request.url).to.be.eq('https://idx.liadm.com/idex/did-1111/any?did=did-1111&resolve=nonId');
|
|
83
|
+
request.respond(
|
|
84
|
+
204,
|
|
85
|
+
responseHeader
|
|
86
|
+
);
|
|
87
|
+
expect(callBackSpy.calledOnceWith({})).to.be.true;
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it('should call the Identity Exchange endpoint without the privided distributorId when appId is provided', function() {
|
|
91
|
+
getCookieStub.returns(null);
|
|
92
|
+
let callBackSpy = sinon.spy();
|
|
93
|
+
let submoduleCallback = liveIntentIdSubmodule.getId({ params: { fireEventDelay: 1, distributorId: 'did-1111', liCollectConfig: { appId: 'a-0001' } } }).callback;
|
|
94
|
+
submoduleCallback(callBackSpy);
|
|
95
|
+
let request = server.requests[0];
|
|
96
|
+
expect(request.url).to.be.eq('https://idx.liadm.com/idex/prebid/any?resolve=nonId');
|
|
97
|
+
request.respond(
|
|
98
|
+
204,
|
|
99
|
+
responseHeader
|
|
100
|
+
);
|
|
101
|
+
expect(callBackSpy.calledOnceWith({})).to.be.true;
|
|
102
|
+
});
|
|
103
|
+
|
|
76
104
|
it('should call the default url of the LiveIntent Identity Exchange endpoint, with a partner', function() {
|
|
77
105
|
getCookieStub.returns(null);
|
|
78
106
|
let callBackSpy = sinon.spy();
|
|
@@ -100,6 +100,23 @@ describe('LiveIntentId', function() {
|
|
|
100
100
|
}, 200);
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
+
it('should fire an event with the provided distributorId', function (done) {
|
|
104
|
+
liveIntentIdSubmodule.decode({}, { params: { fireEventDelay: 1, distributorId: 'did-1111' } });
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
expect(server.requests[0].url).to.match(/https:\/\/rp.liadm.com\/j\?.*did=did-1111.*&wpn=prebid.*/);
|
|
107
|
+
done();
|
|
108
|
+
}, 200);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it('should fire an event without the provided distributorId when appId is provided', function (done) {
|
|
112
|
+
liveIntentIdSubmodule.decode({}, { params: { fireEventDelay: 1, distributorId: 'did-1111', liCollectConfig: { appId: 'a-0001' } } });
|
|
113
|
+
setTimeout(() => {
|
|
114
|
+
expect(server.requests[0].url).to.match(/https:\/\/rp.liadm.com\/j\?.*aid=a-0001.*&wpn=prebid.*/);
|
|
115
|
+
expect(server.requests[0].url).to.not.match(/.*did=*/);
|
|
116
|
+
done();
|
|
117
|
+
}, 200);
|
|
118
|
+
});
|
|
119
|
+
|
|
103
120
|
it('should initialize LiveConnect and emit an event with a privacy string when decode', function(done) {
|
|
104
121
|
uspConsentDataStub.returns('1YNY');
|
|
105
122
|
gdprConsentDataStub.returns({
|
|
@@ -162,6 +179,34 @@ describe('LiveIntentId', function() {
|
|
|
162
179
|
expect(callBackSpy.calledOnceWith({})).to.be.true;
|
|
163
180
|
});
|
|
164
181
|
|
|
182
|
+
it('should call the Identity Exchange endpoint with the privided distributorId', function() {
|
|
183
|
+
getCookieStub.returns(null);
|
|
184
|
+
let callBackSpy = sinon.spy();
|
|
185
|
+
let submoduleCallback = liveIntentIdSubmodule.getId({ params: { fireEventDelay: 1, distributorId: 'did-1111' } }).callback;
|
|
186
|
+
submoduleCallback(callBackSpy);
|
|
187
|
+
let request = server.requests[0];
|
|
188
|
+
expect(request.url).to.be.eq('https://idx.liadm.com/idex/did-1111/any?did=did-1111&resolve=nonId');
|
|
189
|
+
request.respond(
|
|
190
|
+
204,
|
|
191
|
+
responseHeader
|
|
192
|
+
);
|
|
193
|
+
expect(callBackSpy.calledOnceWith({})).to.be.true;
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
it('should call the Identity Exchange endpoint without the privided distributorId when appId is provided', function() {
|
|
197
|
+
getCookieStub.returns(null);
|
|
198
|
+
let callBackSpy = sinon.spy();
|
|
199
|
+
let submoduleCallback = liveIntentIdSubmodule.getId({ params: { fireEventDelay: 1, distributorId: 'did-1111', liCollectConfig: { appId: 'a-0001' } } }).callback;
|
|
200
|
+
submoduleCallback(callBackSpy);
|
|
201
|
+
let request = server.requests[0];
|
|
202
|
+
expect(request.url).to.be.eq('https://idx.liadm.com/idex/prebid/any?resolve=nonId');
|
|
203
|
+
request.respond(
|
|
204
|
+
204,
|
|
205
|
+
responseHeader
|
|
206
|
+
);
|
|
207
|
+
expect(callBackSpy.calledOnceWith({})).to.be.true;
|
|
208
|
+
});
|
|
209
|
+
|
|
165
210
|
it('should call the default url of the LiveIntent Identity Exchange endpoint, with a partner', function() {
|
|
166
211
|
getCookieStub.returns(null);
|
|
167
212
|
let callBackSpy = sinon.spy();
|
|
@@ -9,10 +9,6 @@ import CONSTANTS from 'src/constants.json';
|
|
|
9
9
|
import { config } from 'src/config.js';
|
|
10
10
|
import { server } from 'test/mocks/xhr.js';
|
|
11
11
|
import * as mockGpt from '../integration/faker/googletag.js';
|
|
12
|
-
import {
|
|
13
|
-
setConfig,
|
|
14
|
-
addBidResponseHook,
|
|
15
|
-
} from 'modules/currency.js';
|
|
16
12
|
import { getGlobal } from '../../../src/prebidGlobal.js';
|
|
17
13
|
import { deepAccess } from '../../../src/utils.js';
|
|
18
14
|
|
|
@@ -35,6 +31,16 @@ const {
|
|
|
35
31
|
|
|
36
32
|
const STUBBED_UUID = '12345678-1234-1234-1234-123456789abc';
|
|
37
33
|
|
|
34
|
+
const metrics = {
|
|
35
|
+
getMetrics: () => {
|
|
36
|
+
return {
|
|
37
|
+
'adapter.client.total': 271,
|
|
38
|
+
'adapter.client.net': 240,
|
|
39
|
+
'adapter.s2s.total': 371,
|
|
40
|
+
'adapter.s2s.net': 340
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
38
44
|
// Mock Event Data
|
|
39
45
|
const MOCK = {
|
|
40
46
|
AUCTION_INIT: {
|
|
@@ -160,6 +166,7 @@ const MOCK = {
|
|
|
160
166
|
'size': '300x250',
|
|
161
167
|
'status': 'rendered',
|
|
162
168
|
getStatusCode: () => 1,
|
|
169
|
+
metrics
|
|
163
170
|
},
|
|
164
171
|
SEAT_NON_BID: {
|
|
165
172
|
auctionId: '99785e47-a7c8-4c8a-ae05-ef1c717a4b4d',
|
|
@@ -186,6 +193,7 @@ const MOCK = {
|
|
|
186
193
|
'bidId': '23fcd8cf4bf0d7',
|
|
187
194
|
'auctionId': '99785e47-a7c8-4c8a-ae05-ef1c717a4b4d',
|
|
188
195
|
'src': 'client',
|
|
196
|
+
metrics
|
|
189
197
|
}
|
|
190
198
|
]
|
|
191
199
|
},
|
|
@@ -262,6 +270,7 @@ const ANALYTICS_MESSAGE = {
|
|
|
262
270
|
'source': 'client',
|
|
263
271
|
'status': 'success',
|
|
264
272
|
'clientLatencyMillis': 271,
|
|
273
|
+
'httpLatencyMillis': 240,
|
|
265
274
|
'bidResponse': {
|
|
266
275
|
'bidPriceUSD': 3.4,
|
|
267
276
|
'mediaType': 'banner',
|
|
@@ -298,6 +307,7 @@ const ANALYTICS_MESSAGE = {
|
|
|
298
307
|
'source': 'client',
|
|
299
308
|
'status': 'success',
|
|
300
309
|
'clientLatencyMillis': 271,
|
|
310
|
+
'httpLatencyMillis': 240,
|
|
301
311
|
'bidResponse': {
|
|
302
312
|
'bidPriceUSD': 3.4,
|
|
303
313
|
'mediaType': 'banner',
|
|
@@ -1353,9 +1363,6 @@ describe('magnite analytics adapter', function () {
|
|
|
1353
1363
|
// adunit should be marked as error
|
|
1354
1364
|
expectedMessage.auctions[0].adUnits[0].status = 'error';
|
|
1355
1365
|
|
|
1356
|
-
// timed out in 1000 ms
|
|
1357
|
-
expectedMessage.auctions[0].adUnits[0].bids[0].clientLatencyMillis = 1000;
|
|
1358
|
-
|
|
1359
1366
|
expectedMessage.auctions[0].auctionStart = auctionStart;
|
|
1360
1367
|
|
|
1361
1368
|
expect(message).to.deep.equal(expectedMessage);
|
|
@@ -1439,34 +1446,6 @@ describe('magnite analytics adapter', function () {
|
|
|
1439
1446
|
expect(message).to.deep.equal(expectedMessage);
|
|
1440
1447
|
});
|
|
1441
1448
|
|
|
1442
|
-
it('should pass bidderDetail for multibid auctions', function () {
|
|
1443
|
-
// Set the rates
|
|
1444
|
-
setConfig({
|
|
1445
|
-
adServerCurrency: 'JPY',
|
|
1446
|
-
rates: {
|
|
1447
|
-
USD: {
|
|
1448
|
-
JPY: 100
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
});
|
|
1452
|
-
|
|
1453
|
-
// set our bid response to JPY
|
|
1454
|
-
let bidResponse = utils.deepClone(MOCK.BID_RESPONSE);
|
|
1455
|
-
bidResponse.currency = 'JPY';
|
|
1456
|
-
bidResponse.cpm = 100;
|
|
1457
|
-
|
|
1458
|
-
// Now add the bidResponse hook which hooks on the currenct conversion function onto the bid response
|
|
1459
|
-
let innerBid;
|
|
1460
|
-
addBidResponseHook(function (adCodeId, bid) {
|
|
1461
|
-
innerBid = bid;
|
|
1462
|
-
}, 'elementId', bidResponse);
|
|
1463
|
-
|
|
1464
|
-
// Use the rubi analytics parseBidResponse Function to get the resulting cpm from the bid response!
|
|
1465
|
-
const bidResponseObj = parseBidResponse(innerBid);
|
|
1466
|
-
expect(bidResponseObj).to.have.property('bidPriceUSD');
|
|
1467
|
-
expect(bidResponseObj.bidPriceUSD).to.equal(1.0);
|
|
1468
|
-
});
|
|
1469
|
-
|
|
1470
1449
|
it('should use the integration type provided in the config instead of the default', () => {
|
|
1471
1450
|
config.setConfig({
|
|
1472
1451
|
rubicon: {
|
|
@@ -2096,7 +2075,8 @@ describe('magnite analytics adapter', function () {
|
|
|
2096
2075
|
oldBidId: 'fakeId',
|
|
2097
2076
|
unknownBid: true,
|
|
2098
2077
|
bidId: 'fakeId',
|
|
2099
|
-
clientLatencyMillis: 271
|
|
2078
|
+
clientLatencyMillis: 271,
|
|
2079
|
+
httpLatencyMillis: 240
|
|
2100
2080
|
}
|
|
2101
2081
|
);
|
|
2102
2082
|
});
|
|
@@ -130,6 +130,8 @@ describe('MASS Module', function() {
|
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
it('should have a default renderer', function() {
|
|
133
|
+
// SOT needs at least one script to be on the page; ugly solution, but good enough since mass is to be removed in v8
|
|
134
|
+
document.body.appendChild(document.createElement('script'));
|
|
133
135
|
const render = useDefaultRender('https://example.com/render.js', 'abc');
|
|
134
136
|
render({});
|
|
135
137
|
|