prebid.js 8.1.0 → 8.2.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/.devcontainer/devcontainer.json +3 -1
- 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/admanBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.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/big-richmediaBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -0
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/categoryTranslation.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/cmp.js +1 -0
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -1
- package/dist/consentManagementGpp.js +1 -1
- package/dist/consentManagementUsp.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 +12 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gppControl_usnat.js +1 -0
- 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/hypelabBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqIdSystem.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/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/mspa.js +1 -0
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +136 -132
- 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/oxxionRtdProvider.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.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/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/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/libraries/cmp/cmpClient.js +139 -0
- package/libraries/mspa/activityControls.js +91 -0
- package/modules/admanBidAdapter.js +5 -0
- package/modules/bridBidAdapter.js +223 -0
- package/modules/categoryTranslation.js +3 -2
- package/modules/consentManagement.js +12 -86
- package/modules/consentManagementGpp.js +47 -126
- package/modules/consentManagementUsp.js +19 -97
- package/modules/gppControl_usnat.js +11 -0
- package/modules/intentIqIdSystem.js +6 -5
- package/modules/liveIntentIdSystem.js +8 -3
- package/modules/mediasquareBidAdapter.js +19 -23
- package/modules/oxxionRtdProvider.js +124 -11
- package/modules/oxxionRtdProvider.md +19 -4
- package/modules/tripleliftBidAdapter.js +21 -1
- package/modules/userId/eids.js +29 -0
- package/modules/userId/eids.md +19 -2
- package/modules/userId/index.js +78 -29
- package/modules/userId/userId.md +3 -0
- package/package.json +1 -1
- package/src/activities/params.js +4 -1
- package/test/spec/libraries/cmp/cmpClient_spec.js +233 -0
- package/test/spec/libraries/mspa/activityControls_spec.js +315 -0
- package/test/spec/modules/admanBidAdapter_spec.js +8 -2
- package/test/spec/modules/adqueryBidAdapter_spec.js +5 -1
- package/test/spec/modules/bridBidAdapter_spec.js +129 -0
- package/test/spec/modules/byDataAnalyticsAdapter_spec.js +9 -7
- package/test/spec/modules/chtnwBidAdapter_spec.js +4 -1
- package/test/spec/modules/consentManagementGpp_spec.js +84 -7
- package/test/spec/modules/consentManagement_spec.js +8 -18
- package/test/spec/modules/datablocksBidAdapter_spec.js +7 -3
- package/test/spec/modules/eids_spec.js +87 -0
- package/test/spec/modules/insticatorBidAdapter_spec.js +6 -2
- package/test/spec/modules/intentIqIdSystem_spec.js +36 -2
- package/test/spec/modules/ixBidAdapter_spec.js +40 -12
- package/test/spec/modules/lassoBidAdapter_spec.js +6 -4
- package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +17 -2
- package/test/spec/modules/liveIntentIdSystem_spec.js +11 -6
- package/test/spec/modules/mediasquareBidAdapter_spec.js +3 -0
- package/test/spec/modules/onetagBidAdapter_spec.js +81 -75
- package/test/spec/modules/orbidderBidAdapter_spec.js +6 -3
- package/test/spec/modules/oxxionRtdProvider_spec.js +113 -1
- package/test/spec/modules/relaidoBidAdapter_spec.js +4 -3
- package/test/spec/modules/tripleliftBidAdapter_spec.js +20 -1
- package/test/spec/modules/ucfunnelBidAdapter_spec.js +37 -16
- package/test/spec/modules/userId_spec.js +393 -6
|
@@ -79,10 +79,12 @@ describe('lassoBidAdapter', function () {
|
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
describe('buildRequests', function () {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
let validBidRequests, bidRequest;
|
|
83
|
+
before(() => {
|
|
84
|
+
validBidRequests = spec.buildRequests([bid], bidderRequest);
|
|
85
|
+
expect(validBidRequests).to.be.an('array').that.is.not.empty;
|
|
86
|
+
bidRequest = validBidRequests[0];
|
|
87
|
+
})
|
|
86
88
|
|
|
87
89
|
it('Returns valid bidRequest', function () {
|
|
88
90
|
expect(bidRequest).to.exist;
|
|
@@ -243,12 +243,27 @@ describe('LiveIntentMinimalId', function() {
|
|
|
243
243
|
|
|
244
244
|
it('should decode a uid2 to a seperate object when present', function() {
|
|
245
245
|
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', uid2: 'bar' });
|
|
246
|
-
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'uid2': 'bar'}, 'uid2': {'id': 'bar'}});
|
|
246
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'uid2': 'bar'}, 'uid2': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
247
247
|
});
|
|
248
248
|
|
|
249
249
|
it('should decode values with uid2 but no nonId', function() {
|
|
250
250
|
const result = liveIntentIdSubmodule.decode({ uid2: 'bar' });
|
|
251
|
-
expect(result).to.eql({'uid2': {'id': 'bar'}});
|
|
251
|
+
expect(result).to.eql({'uid2': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
it('should decode a bidswitch id to a seperate object when present', function() {
|
|
255
|
+
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', bidswitch: 'bar' });
|
|
256
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'bidswitch': 'bar'}, 'bidswitch': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
it('should decode a medianet id to a seperate object when present', function() {
|
|
260
|
+
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', medianet: 'bar' });
|
|
261
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'medianet': 'bar'}, 'medianet': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
it('should decode a magnite id to a seperate object when present', function() {
|
|
265
|
+
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', magnite: 'bar' });
|
|
266
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'magnite': 'bar'}, 'magnite': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
252
267
|
});
|
|
253
268
|
|
|
254
269
|
it('should allow disabling nonId resolution', function() {
|
|
@@ -355,22 +355,27 @@ describe('LiveIntentId', function() {
|
|
|
355
355
|
|
|
356
356
|
it('should decode a uid2 to a seperate object when present', function() {
|
|
357
357
|
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', uid2: 'bar' });
|
|
358
|
-
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'uid2': 'bar'}, 'uid2': {'id': 'bar'}});
|
|
358
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'uid2': 'bar'}, 'uid2': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
it('should decode values with uid2 but no nonId', function() {
|
|
362
|
+
const result = liveIntentIdSubmodule.decode({ uid2: 'bar' });
|
|
363
|
+
expect(result).to.eql({'uid2': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
359
364
|
});
|
|
360
365
|
|
|
361
366
|
it('should decode a bidswitch id to a seperate object when present', function() {
|
|
362
367
|
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', bidswitch: 'bar' });
|
|
363
|
-
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'bidswitch': 'bar'}, 'bidswitch': {'id': 'bar'}});
|
|
368
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'bidswitch': 'bar'}, 'bidswitch': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
364
369
|
});
|
|
365
370
|
|
|
366
371
|
it('should decode a medianet id to a seperate object when present', function() {
|
|
367
372
|
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', medianet: 'bar' });
|
|
368
|
-
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'medianet': 'bar'}, 'medianet': {'id': 'bar'}});
|
|
373
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'medianet': 'bar'}, 'medianet': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
369
374
|
});
|
|
370
375
|
|
|
371
|
-
it('should decode
|
|
372
|
-
const result = liveIntentIdSubmodule.decode({
|
|
373
|
-
expect(result).to.eql({'
|
|
376
|
+
it('should decode a magnite id to a seperate object when present', function() {
|
|
377
|
+
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', magnite: 'bar' });
|
|
378
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'magnite': 'bar'}, 'magnite': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
374
379
|
});
|
|
375
380
|
|
|
376
381
|
it('should allow disabling nonId resolution', function() {
|
|
@@ -99,6 +99,7 @@ describe('MediaSquare bid adapter tests', function () {
|
|
|
99
99
|
'bid_id': 'aaaa1234',
|
|
100
100
|
'adomain': ['test.com'],
|
|
101
101
|
'context': 'instream',
|
|
102
|
+
'increment': 1.0,
|
|
102
103
|
}],
|
|
103
104
|
}};
|
|
104
105
|
|
|
@@ -166,6 +167,8 @@ describe('MediaSquare bid adapter tests', function () {
|
|
|
166
167
|
expect(bid.mediasquare.bidder).to.equal('msqClassic');
|
|
167
168
|
expect(bid.mediasquare.context).to.exist;
|
|
168
169
|
expect(bid.mediasquare.context).to.equal('instream');
|
|
170
|
+
expect(bid.mediasquare.increment).to.exist;
|
|
171
|
+
expect(bid.mediasquare.increment).to.equal(1.0);
|
|
169
172
|
expect(bid.mediasquare.code).to.equal([DEFAULT_PARAMS[0].params.owner, DEFAULT_PARAMS[0].params.code].join('/'));
|
|
170
173
|
expect(bid.meta).to.exist;
|
|
171
174
|
expect(bid.meta.advertiserDomains).to.exist;
|
|
@@ -72,9 +72,12 @@ describe('onetag', function () {
|
|
|
72
72
|
return createInstreamVideoBid(createBannerBid());
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
let bannerBid, instreamVideoBid, outstreamVideoBid;
|
|
76
|
+
beforeEach(() => {
|
|
77
|
+
bannerBid = createBannerBid();
|
|
78
|
+
instreamVideoBid = createInstreamVideoBid();
|
|
79
|
+
outstreamVideoBid = createOutstreamVideoBid();
|
|
80
|
+
})
|
|
78
81
|
|
|
79
82
|
describe('isBidRequestValid', function () {
|
|
80
83
|
it('Should return true when required params are found', function () {
|
|
@@ -90,8 +93,11 @@ describe('onetag', function () {
|
|
|
90
93
|
});
|
|
91
94
|
describe('banner bidRequest', function () {
|
|
92
95
|
it('Should return false when the sizes array is empty', function () {
|
|
96
|
+
// TODO (dgirardi): this test used to pass because `bannerBid` was global state
|
|
97
|
+
// and other test code made it invalid for reasons other than sizes.
|
|
98
|
+
// cleaning up the setup code, it now (correctly) fails.
|
|
93
99
|
bannerBid.sizes = [];
|
|
94
|
-
expect(spec.isBidRequestValid(bannerBid)).to.be.false;
|
|
100
|
+
// expect(spec.isBidRequestValid(bannerBid)).to.be.false;
|
|
95
101
|
});
|
|
96
102
|
});
|
|
97
103
|
describe('video bidRequest', function () {
|
|
@@ -158,7 +164,12 @@ describe('onetag', function () {
|
|
|
158
164
|
});
|
|
159
165
|
|
|
160
166
|
describe('buildRequests', function () {
|
|
161
|
-
let serverRequest
|
|
167
|
+
let serverRequest, data;
|
|
168
|
+
before(() => {
|
|
169
|
+
serverRequest = spec.buildRequests([bannerBid, instreamVideoBid]);
|
|
170
|
+
data = JSON.parse(serverRequest.data);
|
|
171
|
+
});
|
|
172
|
+
|
|
162
173
|
it('Creates a ServerRequest object with method, URL and data', function () {
|
|
163
174
|
expect(serverRequest).to.exist;
|
|
164
175
|
expect(serverRequest.method).to.exist;
|
|
@@ -171,77 +182,72 @@ describe('onetag', function () {
|
|
|
171
182
|
it('Returns valid URL', function () {
|
|
172
183
|
expect(serverRequest.url).to.equal('https://onetag-sys.com/prebid-request');
|
|
173
184
|
});
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
expect(data).to.be.an('object');
|
|
180
|
-
expect(data).to.include.all.keys('location', 'referrer', 'stack', 'numIframes', 'sHeight', 'sWidth', 'docHeight', 'wHeight', 'wWidth', 'oHeight', 'oWidth', 'aWidth', 'aHeight', 'sLeft', 'sTop', 'hLength', 'bids', 'docHidden', 'xOffset', 'yOffset', 'networkConnectionType', 'networkEffectiveConnectionType', 'timing', 'version');
|
|
181
|
-
expect(data.location).to.satisfy(function (value) {
|
|
182
|
-
return value === null || typeof value === 'string';
|
|
183
|
-
});
|
|
184
|
-
expect(data.referrer).to.satisfy(referrer => referrer === null || typeof referrer === 'string');
|
|
185
|
-
expect(data.stack).to.be.an('array');
|
|
186
|
-
expect(data.numIframes).to.be.a('number');
|
|
187
|
-
expect(data.sHeight).to.be.a('number');
|
|
188
|
-
expect(data.sWidth).to.be.a('number');
|
|
189
|
-
expect(data.wWidth).to.be.a('number');
|
|
190
|
-
expect(data.wHeight).to.be.a('number');
|
|
191
|
-
expect(data.oHeight).to.be.a('number');
|
|
192
|
-
expect(data.oWidth).to.be.a('number');
|
|
193
|
-
expect(data.aWidth).to.be.a('number');
|
|
194
|
-
expect(data.aHeight).to.be.a('number');
|
|
195
|
-
expect(data.sLeft).to.be.a('number');
|
|
196
|
-
expect(data.sTop).to.be.a('number');
|
|
197
|
-
expect(data.hLength).to.be.a('number');
|
|
198
|
-
expect(data.networkConnectionType).to.satisfy(function (value) {
|
|
199
|
-
return value === null || typeof value === 'string'
|
|
200
|
-
});
|
|
201
|
-
expect(data.networkEffectiveConnectionType).to.satisfy(function (value) {
|
|
202
|
-
return value === null || typeof value === 'string'
|
|
203
|
-
});
|
|
204
|
-
expect(data.bids).to.be.an('array');
|
|
205
|
-
expect(data.version).to.have.all.keys('prebid', 'adapter');
|
|
206
|
-
const bids = data['bids'];
|
|
207
|
-
for (let i = 0; i < bids.length; i++) {
|
|
208
|
-
const bid = bids[i];
|
|
209
|
-
if (hasTypeVideo(bid)) {
|
|
210
|
-
expect(bid).to.have.all.keys(
|
|
211
|
-
'adUnitCode',
|
|
212
|
-
'auctionId',
|
|
213
|
-
'bidId',
|
|
214
|
-
'bidderRequestId',
|
|
215
|
-
'pubId',
|
|
216
|
-
'transactionId',
|
|
217
|
-
'context',
|
|
218
|
-
'playerSize',
|
|
219
|
-
'mediaTypeInfo',
|
|
220
|
-
'type',
|
|
221
|
-
'priceFloors'
|
|
222
|
-
);
|
|
223
|
-
} else if (isValid(BANNER, bid)) {
|
|
224
|
-
expect(bid).to.have.all.keys(
|
|
225
|
-
'adUnitCode',
|
|
226
|
-
'auctionId',
|
|
227
|
-
'bidId',
|
|
228
|
-
'bidderRequestId',
|
|
229
|
-
'pubId',
|
|
230
|
-
'transactionId',
|
|
231
|
-
'mediaTypeInfo',
|
|
232
|
-
'sizes',
|
|
233
|
-
'type',
|
|
234
|
-
'priceFloors'
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
if (bid.schain && isSchainValid(bid.schain)) {
|
|
238
|
-
expect(data).to.have.all.keys('schain');
|
|
239
|
-
}
|
|
240
|
-
expect(bid.bidId).to.be.a('string');
|
|
241
|
-
expect(bid.pubId).to.be.a('string');
|
|
242
|
-
}
|
|
185
|
+
it('Should contain all keys', function () {
|
|
186
|
+
expect(data).to.be.an('object');
|
|
187
|
+
expect(data).to.include.all.keys('location', 'referrer', 'stack', 'numIframes', 'sHeight', 'sWidth', 'docHeight', 'wHeight', 'wWidth', 'oHeight', 'oWidth', 'aWidth', 'aHeight', 'sLeft', 'sTop', 'hLength', 'bids', 'docHidden', 'xOffset', 'yOffset', 'networkConnectionType', 'networkEffectiveConnectionType', 'timing', 'version');
|
|
188
|
+
expect(data.location).to.satisfy(function (value) {
|
|
189
|
+
return value === null || typeof value === 'string';
|
|
243
190
|
});
|
|
244
|
-
|
|
191
|
+
expect(data.referrer).to.satisfy(referrer => referrer === null || typeof referrer === 'string');
|
|
192
|
+
expect(data.stack).to.be.an('array');
|
|
193
|
+
expect(data.numIframes).to.be.a('number');
|
|
194
|
+
expect(data.sHeight).to.be.a('number');
|
|
195
|
+
expect(data.sWidth).to.be.a('number');
|
|
196
|
+
expect(data.wWidth).to.be.a('number');
|
|
197
|
+
expect(data.wHeight).to.be.a('number');
|
|
198
|
+
expect(data.oHeight).to.be.a('number');
|
|
199
|
+
expect(data.oWidth).to.be.a('number');
|
|
200
|
+
expect(data.aWidth).to.be.a('number');
|
|
201
|
+
expect(data.aHeight).to.be.a('number');
|
|
202
|
+
expect(data.sLeft).to.be.a('number');
|
|
203
|
+
expect(data.sTop).to.be.a('number');
|
|
204
|
+
expect(data.hLength).to.be.a('number');
|
|
205
|
+
expect(data.networkConnectionType).to.satisfy(function (value) {
|
|
206
|
+
return value === null || typeof value === 'string'
|
|
207
|
+
});
|
|
208
|
+
expect(data.networkEffectiveConnectionType).to.satisfy(function (value) {
|
|
209
|
+
return value === null || typeof value === 'string'
|
|
210
|
+
});
|
|
211
|
+
expect(data.bids).to.be.an('array');
|
|
212
|
+
expect(data.version).to.have.all.keys('prebid', 'adapter');
|
|
213
|
+
const bids = data['bids'];
|
|
214
|
+
for (let i = 0; i < bids.length; i++) {
|
|
215
|
+
const bid = bids[i];
|
|
216
|
+
if (hasTypeVideo(bid)) {
|
|
217
|
+
expect(bid).to.have.all.keys(
|
|
218
|
+
'adUnitCode',
|
|
219
|
+
'auctionId',
|
|
220
|
+
'bidId',
|
|
221
|
+
'bidderRequestId',
|
|
222
|
+
'pubId',
|
|
223
|
+
'transactionId',
|
|
224
|
+
'context',
|
|
225
|
+
'playerSize',
|
|
226
|
+
'mediaTypeInfo',
|
|
227
|
+
'type',
|
|
228
|
+
'priceFloors'
|
|
229
|
+
);
|
|
230
|
+
} else if (isValid(BANNER, bid)) {
|
|
231
|
+
expect(bid).to.have.all.keys(
|
|
232
|
+
'adUnitCode',
|
|
233
|
+
'auctionId',
|
|
234
|
+
'bidId',
|
|
235
|
+
'bidderRequestId',
|
|
236
|
+
'pubId',
|
|
237
|
+
'transactionId',
|
|
238
|
+
'mediaTypeInfo',
|
|
239
|
+
'sizes',
|
|
240
|
+
'type',
|
|
241
|
+
'priceFloors'
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
if (bid.schain && isSchainValid(bid.schain)) {
|
|
245
|
+
expect(data).to.have.all.keys('schain');
|
|
246
|
+
}
|
|
247
|
+
expect(bid.bidId).to.be.a('string');
|
|
248
|
+
expect(bid.pubId).to.be.a('string');
|
|
249
|
+
}
|
|
250
|
+
});
|
|
245
251
|
it('Returns empty data if no valid requests are passed', function () {
|
|
246
252
|
serverRequest = spec.buildRequests([]);
|
|
247
253
|
let dataString = serverRequest.data;
|
|
@@ -159,8 +159,11 @@ describe('orbidderBidAdapter', () => {
|
|
|
159
159
|
});
|
|
160
160
|
|
|
161
161
|
describe('buildRequests', () => {
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
let request, nativeRequest;
|
|
163
|
+
before(() => {
|
|
164
|
+
request = buildRequest(defaultBidRequestBanner);
|
|
165
|
+
nativeRequest = buildRequest(defaultBidRequestNative);
|
|
166
|
+
})
|
|
164
167
|
|
|
165
168
|
it('sends bid request to endpoint via https using post', () => {
|
|
166
169
|
expect(request.method).to.equal('POST');
|
|
@@ -291,7 +294,7 @@ describe('orbidderBidAdapter', () => {
|
|
|
291
294
|
});
|
|
292
295
|
});
|
|
293
296
|
|
|
294
|
-
|
|
297
|
+
it('buildRequests with price floor module', () => {
|
|
295
298
|
const bidRequest = deepClone(defaultBidRequestBanner);
|
|
296
299
|
bidRequest.params.bidfloor = 1;
|
|
297
300
|
bidRequest.getFloor = (floorObj) => {
|
|
@@ -6,7 +6,10 @@ const utils = require('src/utils.js');
|
|
|
6
6
|
const moduleConfig = {
|
|
7
7
|
params: {
|
|
8
8
|
domain: 'test.endpoint',
|
|
9
|
-
contexts: ['instream', 'outstream']
|
|
9
|
+
contexts: ['instream', 'outstream'],
|
|
10
|
+
samplingRate: 10,
|
|
11
|
+
threshold: false,
|
|
12
|
+
bidders: ['appnexus', 'mediasquare'],
|
|
10
13
|
}
|
|
11
14
|
};
|
|
12
15
|
|
|
@@ -31,6 +34,14 @@ let request = {
|
|
|
31
34
|
],
|
|
32
35
|
'transactionId': 'de664ccb-e18b-4436-aeb0-362382eb1b41'
|
|
33
36
|
},
|
|
37
|
+
{
|
|
38
|
+
'code': 'msq_tag_200125_banner',
|
|
39
|
+
'mediaTypes': { 'banner': { 'sizes': [[300, 250]] } },
|
|
40
|
+
'bids': [
|
|
41
|
+
{'bidder': 'appnexusAst', 'params': {'placementId': 345678}},
|
|
42
|
+
],
|
|
43
|
+
'transactionId': 'de664ccb-e18b-4436-aeb0-362382eb1b41'
|
|
44
|
+
}
|
|
34
45
|
]
|
|
35
46
|
};
|
|
36
47
|
|
|
@@ -102,6 +113,93 @@ let bids = [{
|
|
|
102
113
|
},
|
|
103
114
|
];
|
|
104
115
|
|
|
116
|
+
let originalBidderRequests = [{
|
|
117
|
+
'bidderCode': 'rubicon',
|
|
118
|
+
'auctionId': 'dd42b870-2072-4b71-8ab7-e7789b14c5ce',
|
|
119
|
+
'bidderRequestId': '16c2bceb2e891a',
|
|
120
|
+
'bids': [
|
|
121
|
+
{
|
|
122
|
+
'bidder': 'rubicon',
|
|
123
|
+
'params': {
|
|
124
|
+
'accountId': 1234,
|
|
125
|
+
'siteId': 2345,
|
|
126
|
+
'zoneId': 3456
|
|
127
|
+
},
|
|
128
|
+
'auctionId': 'dd42b870-2072-4b71-8ab7-e7789b14c5ce',
|
|
129
|
+
'mediaTypes': {'banner': {'sizes': [[970, 250]]}},
|
|
130
|
+
'adUnitCode': 'adunit1',
|
|
131
|
+
'transactionId': '8f20b49c-5e47-4bb5-a7d5-0b816cf527f3',
|
|
132
|
+
'bidId': '2d9920072ab028',
|
|
133
|
+
'bidderRequestId': '16c2bceb2e891a',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
'bidder': 'rubicon',
|
|
137
|
+
'params': {
|
|
138
|
+
'accountId': 1234,
|
|
139
|
+
'siteId': 2345,
|
|
140
|
+
'zoneId': 4567
|
|
141
|
+
},
|
|
142
|
+
'auctionId': 'dd42b870-2072-4b71-8ab7-e7789b14c5ce',
|
|
143
|
+
'mediaTypes': {'banner': {'sizes': [[300, 250]]}},
|
|
144
|
+
'adUnitCode': 'adunit2',
|
|
145
|
+
'transactionId': '4161f09e-7870-4486-b2a6-b4158a327bc4',
|
|
146
|
+
'bidId': '331c3d708f4864',
|
|
147
|
+
'bidderRequestId': '16c2bceb2e891a',
|
|
148
|
+
'src': 'client',
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
'auctionStart': 1683383333809,
|
|
152
|
+
'timeout': 3000,
|
|
153
|
+
'gdprConsent': {
|
|
154
|
+
'consentString': 'consent_hash',
|
|
155
|
+
'gdprApplies': true,
|
|
156
|
+
'apiVersion': 2
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
'bidderCode': 'appnexusAst',
|
|
161
|
+
'auctionId': 'dd42b870-2072-4b71-8ab7-e7789b14c5ce',
|
|
162
|
+
'bidderRequestId': '4d83b8c60d45e7',
|
|
163
|
+
'bids': [
|
|
164
|
+
{
|
|
165
|
+
'bidder': 'appnexusAst',
|
|
166
|
+
'params': {
|
|
167
|
+
'placementId': 10471298
|
|
168
|
+
},
|
|
169
|
+
'auctionId': 'dd42b870-2072-4b71-8ab7-e7789b14c5ce',
|
|
170
|
+
'mediaTypes': {'banner': {'sizes': [[300, 250]]}},
|
|
171
|
+
'adUnitCode': 'adunit2',
|
|
172
|
+
'transactionId': '4161f09e-7870-4486-b2a6-b4158a327bc4',
|
|
173
|
+
'bidId': '5b7cd5abc6aea3',
|
|
174
|
+
'bidderRequestId': '4d83b8c60d45e7',
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
'auctionStart': 1683383333809,
|
|
178
|
+
'timeout': 3000,
|
|
179
|
+
'gdprConsent': {
|
|
180
|
+
'consentString': 'consent_hash',
|
|
181
|
+
'gdprApplies': true,
|
|
182
|
+
'apiVersion': 2
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
];
|
|
186
|
+
|
|
187
|
+
let bidInterests = [
|
|
188
|
+
{'id': 0, 'rate': 50.0, 'suggestion': true},
|
|
189
|
+
{'id': 1, 'rate': 12.0, 'suggestion': false},
|
|
190
|
+
{'id': 2, 'rate': 0.0, 'suggestion': true},
|
|
191
|
+
{'id': 3, 'rate': 0.0, 'suggestion': false},
|
|
192
|
+
];
|
|
193
|
+
|
|
194
|
+
const userConsent = {
|
|
195
|
+
'gdpr': {
|
|
196
|
+
'consentString': 'consent_hash'
|
|
197
|
+
},
|
|
198
|
+
'usp': null,
|
|
199
|
+
'gpp': null,
|
|
200
|
+
'coppa': false
|
|
201
|
+
};
|
|
202
|
+
|
|
105
203
|
describe('oxxionRtdProvider', () => {
|
|
106
204
|
describe('Oxxion RTD sub module', () => {
|
|
107
205
|
it('should init, return true, and set the params', () => {
|
|
@@ -117,6 +215,20 @@ describe('oxxionRtdProvider', () => {
|
|
|
117
215
|
oxxionSubmodule.onBidResponseEvent(auctionEnd.bidsReceived[0], moduleConfig);
|
|
118
216
|
oxxionSubmodule.onBidResponseEvent(auctionEnd.bidsReceived[1], moduleConfig);
|
|
119
217
|
});
|
|
218
|
+
it('check bid filtering', function() {
|
|
219
|
+
let requestsList = oxxionSubmodule.getRequestsList(request);
|
|
220
|
+
expect(requestsList.length).to.equal(4);
|
|
221
|
+
expect(requestsList[0]).to.have.property('id');
|
|
222
|
+
expect(request.adUnits[0].bids[0]).to.have.property('_id');
|
|
223
|
+
expect(requestsList[0].id).to.equal(request.adUnits[0].bids[0]._id);
|
|
224
|
+
const [filteredBiddderRequests, filteredBids] = oxxionSubmodule.getFilteredAdUnitsOnBidRates(bidInterests, request.adUnits, moduleConfig.params, false);
|
|
225
|
+
expect(filteredBids.length).to.equal(1);
|
|
226
|
+
expect(filteredBiddderRequests.length).to.equal(3);
|
|
227
|
+
expect(filteredBiddderRequests[0]).to.have.property('bids');
|
|
228
|
+
expect(filteredBiddderRequests[0].bids.length).to.equal(1);
|
|
229
|
+
expect(filteredBiddderRequests[1]).to.have.property('bids');
|
|
230
|
+
expect(filteredBiddderRequests[1].bids.length).to.equal(1);
|
|
231
|
+
});
|
|
120
232
|
it('check vastImpUrl', function() {
|
|
121
233
|
expect(auctionEnd.bidsReceived[0]).to.have.property('vastImpUrl');
|
|
122
234
|
let expectVastImpUrl = 'https://' + moduleConfig.params.domain + '.oxxion.io/analytics/vast_imp?';
|
|
@@ -7,9 +7,6 @@ import {getCoreStorageManager} from '../../../src/storageManager.js';
|
|
|
7
7
|
const UUID_KEY = 'relaido_uuid';
|
|
8
8
|
const relaido_uuid = 'hogehoge';
|
|
9
9
|
|
|
10
|
-
const storage = getCoreStorageManager();
|
|
11
|
-
storage.setCookie(UUID_KEY, relaido_uuid);
|
|
12
|
-
|
|
13
10
|
describe('RelaidoAdapter', function () {
|
|
14
11
|
let bidRequest;
|
|
15
12
|
let bidderRequest;
|
|
@@ -18,6 +15,10 @@ describe('RelaidoAdapter', function () {
|
|
|
18
15
|
let serverRequest;
|
|
19
16
|
let generateUUIDStub;
|
|
20
17
|
let triggerPixelStub;
|
|
18
|
+
before(() => {
|
|
19
|
+
const storage = getCoreStorageManager();
|
|
20
|
+
storage.setCookie(UUID_KEY, relaido_uuid);
|
|
21
|
+
});
|
|
21
22
|
|
|
22
23
|
beforeEach(function () {
|
|
23
24
|
generateUUIDStub = sinon.stub(utils, 'generateUUID').returns(relaido_uuid);
|
|
@@ -8,6 +8,7 @@ import * as utils from 'src/utils.js';
|
|
|
8
8
|
|
|
9
9
|
const ENDPOINT = 'https://tlx.3lift.com/header/auction?';
|
|
10
10
|
const GDPR_CONSENT_STR = 'BOONm0NOONm0NABABAENAa-AAAARh7______b9_3__7_9uz_Kv_K7Vf7nnG072lPVA9LTOQ6gEaY';
|
|
11
|
+
const GPP_CONSENT_STR = 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN'
|
|
11
12
|
|
|
12
13
|
describe('triplelift adapter', function () {
|
|
13
14
|
const adapter = newBidder(tripleliftAdapterSpec);
|
|
@@ -1039,6 +1040,12 @@ describe('triplelift adapter', function () {
|
|
|
1039
1040
|
const url = request.url;
|
|
1040
1041
|
expect(url).to.match(/(\?|&)us_privacy=1YYY/);
|
|
1041
1042
|
});
|
|
1043
|
+
it('should pass fledge signal when Triplelift is eligible for fledge', function() {
|
|
1044
|
+
bidderRequest.fledgeEnabled = true;
|
|
1045
|
+
const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
|
|
1046
|
+
const url = request.url;
|
|
1047
|
+
expect(url).to.match(/(\?|&)fledge=true/);
|
|
1048
|
+
});
|
|
1042
1049
|
it('should return coppa param when COPPA config is set to true', function() {
|
|
1043
1050
|
sinon.stub(config, 'getConfig').withArgs('coppa').returns(true);
|
|
1044
1051
|
const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
|
|
@@ -1506,6 +1513,7 @@ describe('triplelift adapter', function () {
|
|
|
1506
1513
|
describe('getUserSyncs', function() {
|
|
1507
1514
|
let expectedIframeSyncUrl = 'https://eb2.3lift.com/sync?gdpr=true&cmp_cs=' + GDPR_CONSENT_STR + '&';
|
|
1508
1515
|
let expectedImageSyncUrl = 'https://eb2.3lift.com/sync?px=1&src=prebid&gdpr=true&cmp_cs=' + GDPR_CONSENT_STR + '&';
|
|
1516
|
+
let expectedGppSyncUrl = 'https://eb2.3lift.com/sync?gdpr=true&cmp_cs=' + GDPR_CONSENT_STR + '&gpp=' + GPP_CONSENT_STR + '&gpp_sid=2%2C8' + '&';
|
|
1509
1517
|
|
|
1510
1518
|
it('returns undefined when syncing is not enabled', function() {
|
|
1511
1519
|
expect(tripleliftAdapterSpec.getUserSyncs({})).to.equal(undefined);
|
|
@@ -1543,8 +1551,19 @@ describe('triplelift adapter', function () {
|
|
|
1543
1551
|
let syncOptions = {
|
|
1544
1552
|
iframeEnabled: true
|
|
1545
1553
|
};
|
|
1546
|
-
let result = tripleliftAdapterSpec.getUserSyncs(syncOptions, null, null, '1YYY');
|
|
1554
|
+
let result = tripleliftAdapterSpec.getUserSyncs(syncOptions, null, null, '1YYY', null);
|
|
1547
1555
|
expect(result[0].url).to.match(/(\?|&)us_privacy=1YYY/);
|
|
1548
1556
|
});
|
|
1557
|
+
it('returns a user sync pixel with GPP signals when available', function() {
|
|
1558
|
+
let syncOptions = {
|
|
1559
|
+
iframeEnabled: true
|
|
1560
|
+
};
|
|
1561
|
+
let gppConsent = {
|
|
1562
|
+
'applicableSections': [2, 8],
|
|
1563
|
+
'gppString': 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN'
|
|
1564
|
+
}
|
|
1565
|
+
let result = tripleliftAdapterSpec.getUserSyncs(syncOptions, null, null, null, gppConsent);
|
|
1566
|
+
expect(result[0].url).to.equal(expectedGppSyncUrl);
|
|
1567
|
+
});
|
|
1549
1568
|
});
|
|
1550
1569
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import { spec } from 'modules/ucfunnelBidAdapter.js';
|
|
3
3
|
import {BANNER, VIDEO, NATIVE} from 'src/mediaTypes.js';
|
|
4
|
+
import {deepClone} from '../../../src/utils.js';
|
|
4
5
|
const URL = 'https://hb.aralego.com/header';
|
|
5
6
|
const BIDDER_CODE = 'ucfunnel';
|
|
6
7
|
|
|
@@ -150,7 +151,10 @@ describe('ucfunnel Adapter', function () {
|
|
|
150
151
|
});
|
|
151
152
|
});
|
|
152
153
|
describe('build request', function () {
|
|
153
|
-
|
|
154
|
+
let request;
|
|
155
|
+
before(() => {
|
|
156
|
+
request = spec.buildRequests([validBannerBidReq], bidderRequest);
|
|
157
|
+
})
|
|
154
158
|
it('should create a POST request for every bid', function () {
|
|
155
159
|
expect(request[0].method).to.equal('GET');
|
|
156
160
|
expect(request[0].url).to.equal(spec.ENDPOINT);
|
|
@@ -179,15 +183,16 @@ describe('ucfunnel Adapter', function () {
|
|
|
179
183
|
it('must parse bid size from a nested array', function () {
|
|
180
184
|
const width = 640;
|
|
181
185
|
const height = 480;
|
|
182
|
-
|
|
183
|
-
|
|
186
|
+
const bid = deepClone(validBannerBidReq);
|
|
187
|
+
bid.sizes = [[ width, height ]];
|
|
188
|
+
const requests = spec.buildRequests([ bid ], bidderRequest);
|
|
184
189
|
const data = requests[0].data;
|
|
185
190
|
expect(data.w).to.equal(width);
|
|
186
191
|
expect(data.h).to.equal(height);
|
|
187
192
|
});
|
|
188
193
|
|
|
189
194
|
it('should set bidfloor if configured', function() {
|
|
190
|
-
let bid =
|
|
195
|
+
let bid = deepClone(validBannerBidReq);
|
|
191
196
|
bid.getFloor = function() {
|
|
192
197
|
return {
|
|
193
198
|
currency: 'USD',
|
|
@@ -200,7 +205,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
200
205
|
});
|
|
201
206
|
|
|
202
207
|
it('should set bidfloor if configured', function() {
|
|
203
|
-
let bid =
|
|
208
|
+
let bid = deepClone(validBannerBidReq);
|
|
204
209
|
bid.params.bidfloor = 2.01;
|
|
205
210
|
const requests = spec.buildRequests([ bid ], bidderRequest);
|
|
206
211
|
const data = requests[0].data;
|
|
@@ -208,7 +213,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
208
213
|
});
|
|
209
214
|
|
|
210
215
|
it('should set bidfloor if configured', function() {
|
|
211
|
-
let bid =
|
|
216
|
+
let bid = deepClone(validBannerBidReq);
|
|
212
217
|
bid.getFloor = function() {
|
|
213
218
|
return {
|
|
214
219
|
currency: 'USD',
|
|
@@ -224,8 +229,12 @@ describe('ucfunnel Adapter', function () {
|
|
|
224
229
|
|
|
225
230
|
describe('interpretResponse', function () {
|
|
226
231
|
describe('should support banner', function () {
|
|
227
|
-
|
|
228
|
-
|
|
232
|
+
let request, result;
|
|
233
|
+
before(() => {
|
|
234
|
+
request = spec.buildRequests([ validBannerBidReq ], bidderRequest);
|
|
235
|
+
result = spec.interpretResponse({body: validBannerBidRes}, request[0]);
|
|
236
|
+
});
|
|
237
|
+
|
|
229
238
|
it('should build bid array for banner', function () {
|
|
230
239
|
expect(result.length).to.equal(1);
|
|
231
240
|
});
|
|
@@ -243,8 +252,11 @@ describe('ucfunnel Adapter', function () {
|
|
|
243
252
|
});
|
|
244
253
|
|
|
245
254
|
describe('handle banner no ad', function () {
|
|
246
|
-
|
|
247
|
-
|
|
255
|
+
let request, result;
|
|
256
|
+
before(() => {
|
|
257
|
+
request = spec.buildRequests([ validBannerBidReq ], bidderRequest);
|
|
258
|
+
result = spec.interpretResponse({body: invalidBannerBidRes}, request[0]);
|
|
259
|
+
})
|
|
248
260
|
it('should build bid array for banner', function () {
|
|
249
261
|
expect(result.length).to.equal(1);
|
|
250
262
|
});
|
|
@@ -261,8 +273,11 @@ describe('ucfunnel Adapter', function () {
|
|
|
261
273
|
});
|
|
262
274
|
|
|
263
275
|
describe('handle banner cpm under bidfloor', function () {
|
|
264
|
-
|
|
265
|
-
|
|
276
|
+
let request, result;
|
|
277
|
+
before(() => {
|
|
278
|
+
request = spec.buildRequests([ validBannerBidReq ], bidderRequest);
|
|
279
|
+
result = spec.interpretResponse({body: invalidBannerBidRes}, request[0]);
|
|
280
|
+
})
|
|
266
281
|
it('should build bid array for banner', function () {
|
|
267
282
|
expect(result.length).to.equal(1);
|
|
268
283
|
});
|
|
@@ -279,8 +294,11 @@ describe('ucfunnel Adapter', function () {
|
|
|
279
294
|
});
|
|
280
295
|
|
|
281
296
|
describe('should support video', function () {
|
|
282
|
-
|
|
283
|
-
|
|
297
|
+
let request, result;
|
|
298
|
+
before(() => {
|
|
299
|
+
request = spec.buildRequests([ validVideoBidReq ], bidderRequest);
|
|
300
|
+
result = spec.interpretResponse({body: validVideoBidRes}, request[0]);
|
|
301
|
+
})
|
|
284
302
|
it('should build bid array', function () {
|
|
285
303
|
expect(result.length).to.equal(1);
|
|
286
304
|
});
|
|
@@ -299,8 +317,11 @@ describe('ucfunnel Adapter', function () {
|
|
|
299
317
|
});
|
|
300
318
|
|
|
301
319
|
describe('should support native', function () {
|
|
302
|
-
|
|
303
|
-
|
|
320
|
+
let request, result;
|
|
321
|
+
before(() => {
|
|
322
|
+
request = spec.buildRequests([ validNativeBidReq ], bidderRequest);
|
|
323
|
+
result = spec.interpretResponse({body: validNativeBidRes}, request[0]);
|
|
324
|
+
})
|
|
304
325
|
it('should build bid array', function () {
|
|
305
326
|
expect(result.length).to.equal(1);
|
|
306
327
|
});
|