prebid.js 7.14.0 → 7.16.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/.circleci/config.yml +3 -0
- package/dist/1plusXRtdProvider.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adfBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnBidAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/adlooxAdServerVideo.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adtrueBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/airgridRtdProvider.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/aolBidAdapter.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/beachfrontBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bizzclickBidAdapter.js +1 -1
- package/dist/bliinkBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/brandmetricsRtdProvider.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/brightcomBidAdapter.js +1 -1
- package/dist/browsiRtdProvider.js +1 -1
- package/dist/categoryTranslation.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -1
- package/dist/consentManagementUsp.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/cpmstarBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dataControllerModule.js +1 -1
- package/dist/dchain.js +1 -1
- package/dist/deepintentBidAdapter.js +1 -1
- package/dist/dependencies.json +3 -0
- package/dist/dgkeywordRtdProvider.js +1 -1
- package/dist/dianomiBidAdapter.js +1 -1
- package/dist/distroscaleBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/etargetBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fpdModule.js +1 -1
- package/dist/gamoshiBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gothamadsBidAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/iasRtdProvider.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imRtdProvider.js +1 -1
- package/dist/impactifyBidAdapter.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/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentAnalyticsAdapter.js +1 -0
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/luponmediaBidAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mass.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/mediasniperBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/multibid.js +1 -1
- package/dist/naveggIdSystem.js +1 -1
- package/dist/newspassidBidAdapter.js +1 -1
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +172 -171
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/oneKeyRtdProvider.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -1
- package/dist/operaadsBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/ozoneBidAdapter.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 +2 -2
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/pubCommonId.js +1 -1
- package/dist/pubgeniusBidAdapter.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubwiseBidAdapter.js +1 -1
- package/dist/pubxBidAdapter.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/rtdModule.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/sirdataRtdProvider.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/spotxBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stroeerCoreBidAdapter.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/ucfunnelBidAdapter.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/viewability.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/weboramaRtdProvider.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldliftBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/modules/amxBidAdapter.js +98 -78
- package/modules/appnexusBidAdapter.js +73 -12
- package/modules/categoryTranslation.js +9 -8
- package/modules/consentManagement.js +4 -2
- package/modules/consentManagementUsp.js +17 -14
- package/modules/cpmstarBidAdapter.js +2 -1
- package/modules/currency.js +4 -3
- package/modules/dataControllerModule/index.js +4 -3
- package/modules/dchain.js +3 -2
- package/modules/dianomiBidAdapter.js +17 -14
- package/modules/dianomiBidAdapter.md +1 -1
- package/modules/feedadBidAdapter.js +40 -8
- package/modules/fpdModule/index.js +3 -2
- package/modules/iasRtdProvider.js +17 -3
- package/modules/ixBidAdapter.js +2 -5
- package/modules/liveIntentAnalyticsAdapter.js +148 -0
- package/modules/liveIntentAnalyticsAdapter.md +22 -0
- package/modules/mass.js +5 -3
- package/modules/multibid/index.js +4 -2
- package/modules/naveggIdSystem.js +53 -22
- package/modules/nextMillenniumBidAdapter.js +168 -55
- package/modules/openxOrtbBidAdapter.js +1 -1
- package/modules/prebidServerBidAdapter/index.js +18 -4
- package/modules/priceFloors.js +5 -4
- package/modules/pubCommonId.js +3 -2
- package/modules/rtdModule/index.js +3 -2
- package/modules/sharethroughBidAdapter.js +8 -6
- package/modules/spotxBidAdapter.js +1 -0
- package/modules/stroeerCoreBidAdapter.js +129 -92
- package/modules/stroeerCoreBidAdapter.md +52 -14
- package/modules/teadsBidAdapter.js +32 -10
- package/modules/ucfunnelBidAdapter.js +9 -10
- package/modules/userId/index.js +73 -48
- package/modules/viewability.js +2 -170
- package/package.json +3 -3
- package/src/adapterManager.js +21 -13
- package/src/adapters/bidderFactory.js +28 -6
- package/src/auction.js +17 -4
- package/src/auctionManager.js +5 -0
- package/src/constants.json +2 -0
- package/src/native.js +5 -2
- package/src/prebid.js +52 -23
- package/src/secureCreatives.js +1 -1
- package/src/utils/perfMetrics.js +386 -0
- package/src/utils.js +1 -1
- package/test/helpers/testing-utils.js +4 -3
- package/test/spec/modules/adriverIdSystem_spec.js +7 -3
- package/test/spec/modules/amxBidAdapter_spec.js +250 -192
- package/test/spec/modules/appnexusBidAdapter_spec.js +61 -6
- package/test/spec/modules/consentManagementUsp_spec.js +6 -2
- package/test/spec/modules/dianomiBidAdapter_spec.js +326 -6
- package/test/spec/modules/feedadBidAdapter_spec.js +147 -11
- package/test/spec/modules/iasRtdProvider_spec.js +3 -1
- package/test/spec/modules/ixBidAdapter_spec.js +0 -64
- package/test/spec/modules/liveIntentAnalyticsAdapter_spec.js +297 -0
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +103 -1
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +31 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +23 -2
- package/test/spec/modules/spotxBidAdapter_spec.js +6 -0
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +315 -33
- package/test/spec/modules/teadsBidAdapter_spec.js +65 -11
- package/test/spec/modules/ucfunnelBidAdapter_spec.js +24 -10
- package/test/spec/native_spec.js +11 -0
- package/test/spec/unit/utils/perfMetrics_spec.js +394 -0
- package/wdio.conf.js +1 -0
- package/modules/viewability.md +0 -87
- package/test/spec/modules/viewability_spec.js +0 -280
|
@@ -21,9 +21,8 @@ describe('stroeerCore bid adapter', function () {
|
|
|
21
21
|
sandbox.restore();
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
function
|
|
24
|
+
function assertStandardFieldsBid(bidObject, bidId, width, height, cpm) {
|
|
25
25
|
assert.propertyVal(bidObject, 'requestId', bidId);
|
|
26
|
-
assert.propertyVal(bidObject, 'ad', ad);
|
|
27
26
|
assert.propertyVal(bidObject, 'width', width);
|
|
28
27
|
assert.propertyVal(bidObject, 'height', height);
|
|
29
28
|
assert.propertyVal(bidObject, 'cpm', cpm);
|
|
@@ -32,6 +31,26 @@ describe('stroeerCore bid adapter', function () {
|
|
|
32
31
|
assert.propertyVal(bidObject, 'creativeId', '');
|
|
33
32
|
}
|
|
34
33
|
|
|
34
|
+
function assertStandardFieldsOnBannerBid(bidObject, bidId, ad, width, height, cpm) {
|
|
35
|
+
assertStandardFieldsBid(bidObject, bidId, width, height, cpm);
|
|
36
|
+
assertBannerAdMarkup(bidObject, ad);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function assertStandardFieldsOnVideoBid(bidObject, bidId, vastXml, width, height, cpm) {
|
|
40
|
+
assertStandardFieldsBid(bidObject, bidId, width, height, cpm);
|
|
41
|
+
assertVideoVastXml(bidObject, vastXml);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function assertBannerAdMarkup(bidObject, ad) {
|
|
45
|
+
assert.propertyVal(bidObject, 'ad', ad);
|
|
46
|
+
assert.notProperty(bidObject, 'vastXml');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function assertVideoVastXml(bidObject, vastXml) {
|
|
50
|
+
assert.propertyVal(bidObject, 'vastXml', vastXml);
|
|
51
|
+
assert.notProperty(bidObject, 'ad');
|
|
52
|
+
}
|
|
53
|
+
|
|
35
54
|
const AUCTION_ID = utils.getUniqueIdentifierStr();
|
|
36
55
|
|
|
37
56
|
// Vendor user ids and associated data
|
|
@@ -91,16 +110,6 @@ describe('stroeerCore bid adapter', function () {
|
|
|
91
110
|
}],
|
|
92
111
|
});
|
|
93
112
|
|
|
94
|
-
const buildBidderRequestPreVersion3 = () => {
|
|
95
|
-
const request = buildBidderRequest();
|
|
96
|
-
request.bids.forEach((bid) => {
|
|
97
|
-
bid.sizes = bid.mediaTypes.banner.sizes;
|
|
98
|
-
delete bid.mediaTypes;
|
|
99
|
-
bid.mediaType = 'banner';
|
|
100
|
-
});
|
|
101
|
-
return request;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
113
|
const buildBidderResponse = () => ({
|
|
105
114
|
'bids': [{
|
|
106
115
|
'bidId': 'bid1', 'cpm': 4.0, 'width': 300, 'height': 600, 'ad': '<div>tag1</div>', 'tracking': {'brandId': 123}
|
|
@@ -109,10 +118,16 @@ describe('stroeerCore bid adapter', function () {
|
|
|
109
118
|
}]
|
|
110
119
|
});
|
|
111
120
|
|
|
121
|
+
const buildBidderResponseWithVideo = () => ({
|
|
122
|
+
'bids': [{
|
|
123
|
+
'bidId': 'bid1', 'cpm': 4.0, 'width': 800, 'height': 250, 'vastXml': '<vast>video</vast>'
|
|
124
|
+
}]
|
|
125
|
+
});
|
|
126
|
+
|
|
112
127
|
const createWindow = (href, params = {}) => {
|
|
113
128
|
let {parent, top, frameElement, placementElements = []} = params;
|
|
114
129
|
|
|
115
|
-
const protocol =
|
|
130
|
+
const protocol = href.startsWith('https') ? 'https:' : 'http:';
|
|
116
131
|
const win = {
|
|
117
132
|
frameElement,
|
|
118
133
|
parent,
|
|
@@ -187,8 +202,12 @@ describe('stroeerCore bid adapter', function () {
|
|
|
187
202
|
return {topWin, midWin, win};
|
|
188
203
|
}
|
|
189
204
|
|
|
190
|
-
it('should
|
|
191
|
-
assert.deepEqual(spec.supportedMediaTypes, [BANNER]);
|
|
205
|
+
it('should support BANNER and VIDEO mediaType', function () {
|
|
206
|
+
assert.deepEqual(spec.supportedMediaTypes, [BANNER, VIDEO]);
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it('should have GDPR vendor list id (gvlid) set on the spec', function () {
|
|
210
|
+
assert.equal(spec.gvlid, 136);
|
|
192
211
|
});
|
|
193
212
|
|
|
194
213
|
describe('bid validation entry point', () => {
|
|
@@ -211,16 +230,86 @@ describe('stroeerCore bid adapter', function () {
|
|
|
211
230
|
assert.isFalse(spec.isBidRequestValid(bidRequest));
|
|
212
231
|
});
|
|
213
232
|
|
|
214
|
-
it('should
|
|
233
|
+
it('should allow instream video bids', () => {
|
|
234
|
+
delete bidRequest.mediaTypes.banner;
|
|
235
|
+
bidRequest.mediaTypes.video = {
|
|
236
|
+
playerSize: [640, 480],
|
|
237
|
+
context: 'instream'
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
assert.isTrue(spec.isBidRequestValid(bidRequest));
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
it('should allow outstream video bids', () => {
|
|
215
244
|
delete bidRequest.mediaTypes.banner;
|
|
216
245
|
bidRequest.mediaTypes.video = {
|
|
217
|
-
playerSize: [640, 480]
|
|
246
|
+
playerSize: [640, 480],
|
|
247
|
+
context: 'outstream'
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
assert.isTrue(spec.isBidRequestValid(bidRequest));
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
it('should allow multi-format bid that has banner and instream video', () => {
|
|
254
|
+
assert.isTrue('banner' in bidRequest.mediaTypes);
|
|
255
|
+
|
|
256
|
+
// Allowed because instream video component of the bid will be ignored in buildRequest()
|
|
257
|
+
bidRequest.mediaTypes.video = {
|
|
258
|
+
playerSize: [640, 480],
|
|
259
|
+
context: 'instream'
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
assert.isTrue(spec.isBidRequestValid(bidRequest))
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
it('should exclude multi-format bid that has no format of interest', () => {
|
|
266
|
+
bidRequest.mediaTypes = {
|
|
267
|
+
video: {
|
|
268
|
+
playerSize: [640, 480],
|
|
269
|
+
context: 'adpod'
|
|
270
|
+
},
|
|
271
|
+
native: {
|
|
272
|
+
image: {
|
|
273
|
+
required: true,
|
|
274
|
+
sizes: [150, 50]
|
|
275
|
+
},
|
|
276
|
+
title: {
|
|
277
|
+
required: true,
|
|
278
|
+
len: 80
|
|
279
|
+
},
|
|
280
|
+
sponsoredBy: {
|
|
281
|
+
required: true
|
|
282
|
+
},
|
|
283
|
+
clickUrl: {
|
|
284
|
+
required: true
|
|
285
|
+
},
|
|
286
|
+
privacyLink: {
|
|
287
|
+
required: false
|
|
288
|
+
},
|
|
289
|
+
body: {
|
|
290
|
+
required: true
|
|
291
|
+
},
|
|
292
|
+
icon: {
|
|
293
|
+
required: true,
|
|
294
|
+
sizes: [50, 50]
|
|
295
|
+
}
|
|
296
|
+
}
|
|
218
297
|
};
|
|
219
298
|
|
|
220
299
|
assert.isFalse(spec.isBidRequestValid(bidRequest));
|
|
221
300
|
});
|
|
222
301
|
|
|
223
|
-
it('should exclude
|
|
302
|
+
it('should exclude video bids without context', () => {
|
|
303
|
+
delete bidRequest.mediaTypes.banner;
|
|
304
|
+
bidRequest.mediaTypes.video = {
|
|
305
|
+
playerSize: [640, 480],
|
|
306
|
+
context: undefined
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
assert.isFalse(spec.isBidRequestValid(bidRequest));
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
it('should exclude video, pre-version 3 bids', () => {
|
|
224
313
|
delete bidRequest.mediaTypes;
|
|
225
314
|
bidRequest.mediaType = VIDEO;
|
|
226
315
|
assert.isFalse(spec.isBidRequestValid(bidRequest));
|
|
@@ -253,9 +342,13 @@ describe('stroeerCore bid adapter', function () {
|
|
|
253
342
|
|
|
254
343
|
describe('should use custom url if provided', () => {
|
|
255
344
|
const samples = [{
|
|
256
|
-
protocol: 'http:',
|
|
345
|
+
protocol: 'http:',
|
|
346
|
+
params: {sid: 'ODA=', host: 'other.com', port: '234', path: '/xyz'},
|
|
347
|
+
expected: 'https://other.com:234/xyz'
|
|
257
348
|
}, {
|
|
258
|
-
protocol: 'https:',
|
|
349
|
+
protocol: 'https:',
|
|
350
|
+
params: {sid: 'ODA=', host: 'other.com', port: '234', path: '/xyz'},
|
|
351
|
+
expected: 'https://other.com:234/xyz'
|
|
259
352
|
}, {
|
|
260
353
|
protocol: 'https:',
|
|
261
354
|
params: {sid: 'ODA=', host: 'other.com', port: '234', securePort: '871', path: '/xyz'},
|
|
@@ -315,9 +408,19 @@ describe('stroeerCore bid adapter', function () {
|
|
|
315
408
|
'ssl': false,
|
|
316
409
|
'url': 'https://www.example.com/monkey/index.html',
|
|
317
410
|
'bids': [{
|
|
318
|
-
'sid': 'NDA=',
|
|
411
|
+
'sid': 'NDA=',
|
|
412
|
+
'bid': 'bid1',
|
|
413
|
+
'viz': true,
|
|
414
|
+
'ban': {
|
|
415
|
+
'siz': [[300, 600], [160, 60]]
|
|
416
|
+
}
|
|
319
417
|
}, {
|
|
320
|
-
'sid': 'ODA=',
|
|
418
|
+
'sid': 'ODA=',
|
|
419
|
+
'bid': 'bid2',
|
|
420
|
+
'viz': true,
|
|
421
|
+
'ban': {
|
|
422
|
+
'siz': [[728, 90]]
|
|
423
|
+
}
|
|
321
424
|
}],
|
|
322
425
|
'user': {
|
|
323
426
|
'euids': userIds
|
|
@@ -330,13 +433,182 @@ describe('stroeerCore bid adapter', function () {
|
|
|
330
433
|
assert.deepEqual(actualJsonPayload, expectedJsonPayload);
|
|
331
434
|
});
|
|
332
435
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
436
|
+
describe('video bids', () => {
|
|
437
|
+
it('should be able to build instream video bid', () => {
|
|
438
|
+
bidderRequest.bids = [{
|
|
439
|
+
bidId: 'bid1',
|
|
440
|
+
bidder: 'stroeerCore',
|
|
441
|
+
adUnitCode: 'div-1',
|
|
442
|
+
mediaTypes: {
|
|
443
|
+
video: {
|
|
444
|
+
context: 'instream',
|
|
445
|
+
playerSize: [640, 480],
|
|
446
|
+
mimes: ['video/mp4', 'video/quicktime']
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
params: {
|
|
450
|
+
sid: 'NDA='
|
|
451
|
+
},
|
|
452
|
+
userId: userIds
|
|
453
|
+
}];
|
|
454
|
+
|
|
455
|
+
const expectedBids = [{
|
|
456
|
+
'sid': 'NDA=',
|
|
457
|
+
'bid': 'bid1',
|
|
458
|
+
'viz': true,
|
|
459
|
+
'vid': {
|
|
460
|
+
'ctx': 'instream',
|
|
461
|
+
'siz': [640, 480],
|
|
462
|
+
'mim': ['video/mp4', 'video/quicktime']
|
|
463
|
+
}
|
|
464
|
+
}];
|
|
465
|
+
|
|
466
|
+
const serverRequestInfo = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
467
|
+
|
|
468
|
+
const bids = JSON.parse(JSON.stringify(serverRequestInfo.data.bids));
|
|
469
|
+
assert.deepEqual(bids, expectedBids);
|
|
470
|
+
});
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
describe('multi-formats', () => {
|
|
474
|
+
it(`should create a request for video and banner`, () => {
|
|
475
|
+
const videoBid = {
|
|
476
|
+
bidId: 'bid3',
|
|
477
|
+
bidder: 'stroeerCore',
|
|
478
|
+
adUnitCode: 'div-1',
|
|
479
|
+
mediaTypes: {
|
|
480
|
+
video: {
|
|
481
|
+
context: 'instream',
|
|
482
|
+
playerSize: [640, 480],
|
|
483
|
+
mimes: ['video/mp4', 'video/quicktime'],
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
params: {
|
|
487
|
+
sid: 'ODA=',
|
|
488
|
+
},
|
|
489
|
+
userId: userIds
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
const bannerBid1 = {
|
|
493
|
+
bidId: 'bid8',
|
|
494
|
+
bidder: 'stroeerCore',
|
|
495
|
+
adUnitCode: 'div-2',
|
|
496
|
+
mediaTypes: {
|
|
497
|
+
banner: {
|
|
498
|
+
sizes: [[300, 600], [160, 60]],
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
params: {
|
|
502
|
+
sid: 'NDA=',
|
|
503
|
+
},
|
|
504
|
+
userId: userIds
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
const bannerBid2 = {
|
|
508
|
+
bidId: 'bid12',
|
|
509
|
+
bidder: 'stroeerCore',
|
|
510
|
+
adUnitCode: 'div-3',
|
|
511
|
+
mediaTypes: {
|
|
512
|
+
banner: {
|
|
513
|
+
sizes: [[100, 200], [300, 500]],
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
params: {
|
|
517
|
+
sid: 'ABC=',
|
|
518
|
+
},
|
|
519
|
+
userId: userIds
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
bidderRequest.bids = [bannerBid1, videoBid, bannerBid2];
|
|
523
|
+
|
|
524
|
+
const expectedBannerBids = [
|
|
525
|
+
{
|
|
526
|
+
'sid': 'NDA=',
|
|
527
|
+
'bid': 'bid8',
|
|
528
|
+
'viz': true,
|
|
529
|
+
'ban': {
|
|
530
|
+
'siz': [[300, 600], [160, 60]]
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
'sid': 'ABC=',
|
|
535
|
+
'bid': 'bid12',
|
|
536
|
+
'ban': {
|
|
537
|
+
'siz': [[100, 200], [300, 500]]
|
|
538
|
+
},
|
|
539
|
+
'viz': undefined
|
|
540
|
+
}
|
|
541
|
+
];
|
|
542
|
+
|
|
543
|
+
const expectedVideoBids = [
|
|
544
|
+
{
|
|
545
|
+
'sid': 'ODA=',
|
|
546
|
+
'bid': 'bid3',
|
|
547
|
+
'viz': true,
|
|
548
|
+
'vid': {
|
|
549
|
+
'ctx': 'instream',
|
|
550
|
+
'siz': [640, 480],
|
|
551
|
+
'mim': ['video/mp4', 'video/quicktime']
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
];
|
|
555
|
+
|
|
556
|
+
const serverRequestInfo = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
557
|
+
|
|
558
|
+
assert.deepEqual(serverRequestInfo.data.bids, [...expectedBannerBids, ...expectedVideoBids]);
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
it('should split multi-format bid', function() {
|
|
562
|
+
const multiFormatBid = {
|
|
563
|
+
bidId: 'bid3',
|
|
564
|
+
bidder: 'stroeerCore',
|
|
565
|
+
adUnitCode: 'div-1',
|
|
566
|
+
mediaTypes: {
|
|
567
|
+
video: {
|
|
568
|
+
context: 'instream',
|
|
569
|
+
playerSize: [640, 480],
|
|
570
|
+
mimes: ['video/mp4', 'video/quicktime'],
|
|
571
|
+
},
|
|
572
|
+
banner: {
|
|
573
|
+
sizes: [[100, 200], [300, 500]],
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
params: {
|
|
577
|
+
sid: 'ODA=',
|
|
578
|
+
},
|
|
579
|
+
userId: userIds
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
bidderRequest.bids = [multiFormatBid];
|
|
583
|
+
|
|
584
|
+
const serverRequestInfo = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
585
|
+
|
|
586
|
+
const expectedBannerBids = [
|
|
587
|
+
{
|
|
588
|
+
'sid': 'ODA=',
|
|
589
|
+
'bid': 'bid3',
|
|
590
|
+
'viz': true,
|
|
591
|
+
'ban': {
|
|
592
|
+
'siz': [[100, 200], [300, 500]]
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
];
|
|
596
|
+
|
|
597
|
+
const expectedVideoBids = [
|
|
598
|
+
{
|
|
599
|
+
'sid': 'ODA=',
|
|
600
|
+
'bid': 'bid3',
|
|
601
|
+
'viz': true,
|
|
602
|
+
'vid': {
|
|
603
|
+
'ctx': 'instream',
|
|
604
|
+
'siz': [640, 480],
|
|
605
|
+
'mim': ['video/mp4', 'video/quicktime']
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
];
|
|
609
|
+
|
|
610
|
+
assert.deepEqual(serverRequestInfo.data.bids, [...expectedBannerBids, ...expectedVideoBids]);
|
|
611
|
+
});
|
|
340
612
|
});
|
|
341
613
|
|
|
342
614
|
describe('optional fields', () => {
|
|
@@ -364,7 +636,10 @@ describe('stroeerCore bid adapter', function () {
|
|
|
364
636
|
}
|
|
365
637
|
});
|
|
366
638
|
|
|
367
|
-
const gdprSamples = [{consentString: 'RG9ua2V5IEtvbmc=', gdprApplies: true}, {
|
|
639
|
+
const gdprSamples = [{consentString: 'RG9ua2V5IEtvbmc=', gdprApplies: true}, {
|
|
640
|
+
consentString: 'UGluZyBQb25n',
|
|
641
|
+
gdprApplies: false
|
|
642
|
+
}];
|
|
368
643
|
gdprSamples.forEach((sample) => {
|
|
369
644
|
it(`should add GDPR info ${JSON.stringify(sample)} when provided`, () => {
|
|
370
645
|
const bidReq = buildBidderRequest();
|
|
@@ -424,7 +699,6 @@ describe('stroeerCore bid adapter', function () {
|
|
|
424
699
|
bidReq.bids.forEach(bid => bid.schain = schain);
|
|
425
700
|
|
|
426
701
|
const serverRequestInfo = spec.buildRequests(bidReq.bids, bidReq);
|
|
427
|
-
|
|
428
702
|
assert.deepEqual(serverRequestInfo.data.schain, schain);
|
|
429
703
|
});
|
|
430
704
|
});
|
|
@@ -449,8 +723,8 @@ describe('stroeerCore bid adapter', function () {
|
|
|
449
723
|
const bidderResponse = buildBidderResponse();
|
|
450
724
|
|
|
451
725
|
const result = spec.interpretResponse({body: bidderResponse});
|
|
452
|
-
|
|
453
|
-
|
|
726
|
+
assertStandardFieldsOnBannerBid(result[0], 'bid1', '<div>tag1</div>', 300, 600, 4);
|
|
727
|
+
assertStandardFieldsOnBannerBid(result[1], 'bid2', '<div>tag2</div>', 728, 90, 7.3);
|
|
454
728
|
});
|
|
455
729
|
|
|
456
730
|
it('should return empty array, when response contains no bids', () => {
|
|
@@ -458,6 +732,13 @@ describe('stroeerCore bid adapter', function () {
|
|
|
458
732
|
assert.deepStrictEqual(result, []);
|
|
459
733
|
});
|
|
460
734
|
|
|
735
|
+
it('should interpret a video response', () => {
|
|
736
|
+
const bidderResponse = buildBidderResponseWithVideo();
|
|
737
|
+
const bidResponses = spec.interpretResponse({body: bidderResponse});
|
|
738
|
+
let videoBidResponse = bidResponses[0];
|
|
739
|
+
assertStandardFieldsOnVideoBid(videoBidResponse, 'bid1', '<vast>video</vast>', 800, 250, 4);
|
|
740
|
+
})
|
|
741
|
+
|
|
461
742
|
it('should add data to meta object', () => {
|
|
462
743
|
const response = buildBidderResponse();
|
|
463
744
|
response.bids[0] = Object.assign(response.bids[0], {adomain: ['website.org', 'domain.com']});
|
|
@@ -470,6 +751,7 @@ describe('stroeerCore bid adapter', function () {
|
|
|
470
751
|
|
|
471
752
|
describe('get user syncs entry point', () => {
|
|
472
753
|
let win;
|
|
754
|
+
|
|
473
755
|
beforeEach(() => {
|
|
474
756
|
win = setupSingleWindow(sandbox);
|
|
475
757
|
|
|
@@ -470,35 +470,89 @@ describe('teadsBidAdapter', () => {
|
|
|
470
470
|
'deviceWidth': 1680
|
|
471
471
|
};
|
|
472
472
|
|
|
473
|
-
|
|
474
|
-
|
|
473
|
+
const userIdModules = {
|
|
474
|
+
unifiedId2: {uid2: {id: 'unifiedId2-id'}},
|
|
475
|
+
liveRampId: {idl_env: 'liveRampId-id'},
|
|
476
|
+
lotamePanoramaId: {lotamePanoramaId: 'lotamePanoramaId-id'},
|
|
477
|
+
id5Id: {id5id: {uid: 'id5Id-id'}},
|
|
478
|
+
criteoId: {criteoId: 'criteoId-id'},
|
|
479
|
+
yahooConnectId: {connectId: 'yahooConnectId-id'},
|
|
480
|
+
quantcastId: {quantcastId: 'quantcastId-id'},
|
|
481
|
+
epsilonPublisherLinkId: {publinkId: 'epsilonPublisherLinkId-id'},
|
|
482
|
+
publisherFirstPartyViewerId: {pubcid: 'publisherFirstPartyViewerId-id'},
|
|
483
|
+
merkleId: {merkleId: {id: 'merkleId-id'}},
|
|
484
|
+
kinessoId: {kpuid: 'kinessoId-id'}
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
describe('User Id Modules', function () {
|
|
488
|
+
it(`should not add param to payload if user id system is not enabled`, function () {
|
|
475
489
|
const bidRequest = {
|
|
476
490
|
...baseBidRequest,
|
|
477
|
-
userId: {} // no
|
|
491
|
+
userId: {} // no property -> assumption that the system is disabled
|
|
478
492
|
};
|
|
479
493
|
|
|
480
494
|
const request = spec.buildRequests([bidRequest], bidderResquestDefault);
|
|
481
495
|
const payload = JSON.parse(request.data);
|
|
482
496
|
|
|
483
|
-
|
|
497
|
+
for (const userId in userIdModules) {
|
|
498
|
+
expect(payload, userId).not.to.have.property(userId);
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
it(`should not add param to payload if user id field is absent`, function () {
|
|
503
|
+
const request = spec.buildRequests([baseBidRequest], bidderResquestDefault);
|
|
504
|
+
const payload = JSON.parse(request.data);
|
|
505
|
+
|
|
506
|
+
for (const userId in userIdModules) {
|
|
507
|
+
expect(payload, userId).not.to.have.property(userId);
|
|
508
|
+
}
|
|
484
509
|
});
|
|
485
510
|
|
|
486
|
-
it(
|
|
511
|
+
it(`should not add param to payload if user id is enabled but there is no value`, function () {
|
|
487
512
|
const bidRequest = {
|
|
488
513
|
...baseBidRequest,
|
|
489
514
|
userId: {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
}
|
|
515
|
+
idl_env: '',
|
|
516
|
+
pubcid: 'publisherFirstPartyViewerId-id'
|
|
493
517
|
}
|
|
494
518
|
};
|
|
495
519
|
|
|
496
520
|
const request = spec.buildRequests([bidRequest], bidderResquestDefault);
|
|
497
521
|
const payload = JSON.parse(request.data);
|
|
498
522
|
|
|
499
|
-
expect(payload
|
|
500
|
-
|
|
501
|
-
|
|
523
|
+
expect(payload).not.to.have.property('liveRampId');
|
|
524
|
+
expect(payload['publisherFirstPartyViewerId']).to.equal('publisherFirstPartyViewerId-id');
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
it(`should add userId param to payload for each enabled user id system`, function () {
|
|
528
|
+
let userIdObject = {};
|
|
529
|
+
for (const userId in userIdModules) {
|
|
530
|
+
userIdObject = {
|
|
531
|
+
...userIdObject,
|
|
532
|
+
...userIdModules[userId]
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
const bidRequest = {
|
|
536
|
+
...baseBidRequest,
|
|
537
|
+
userId: userIdObject
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
const request = spec.buildRequests([bidRequest], bidderResquestDefault);
|
|
541
|
+
const payload = JSON.parse(request.data);
|
|
542
|
+
|
|
543
|
+
expect(payload['unifiedId2']).to.equal('unifiedId2-id');
|
|
544
|
+
expect(payload['liveRampId']).to.equal('liveRampId-id');
|
|
545
|
+
expect(payload['lotamePanoramaId']).to.equal('lotamePanoramaId-id');
|
|
546
|
+
expect(payload['id5Id']).to.equal('id5Id-id');
|
|
547
|
+
expect(payload['criteoId']).to.equal('criteoId-id');
|
|
548
|
+
expect(payload['yahooConnectId']).to.equal('yahooConnectId-id');
|
|
549
|
+
expect(payload['quantcastId']).to.equal('quantcastId-id');
|
|
550
|
+
expect(payload['epsilonPublisherLinkId']).to.equal('epsilonPublisherLinkId-id');
|
|
551
|
+
expect(payload['publisherFirstPartyViewerId']).to.equal('publisherFirstPartyViewerId-id');
|
|
552
|
+
expect(payload['merkleId']).to.equal('merkleId-id');
|
|
553
|
+
expect(payload['kinessoId']).to.equal('kinessoId-id');
|
|
554
|
+
});
|
|
555
|
+
})
|
|
502
556
|
|
|
503
557
|
describe('First-party cookie Teads ID', function () {
|
|
504
558
|
it('should not add firstPartyCookieTeadsId param to payload if cookies are not enabled', function () {
|
|
@@ -5,7 +5,11 @@ const URL = 'https://hb.aralego.com/header';
|
|
|
5
5
|
const BIDDER_CODE = 'ucfunnel';
|
|
6
6
|
|
|
7
7
|
const bidderRequest = {
|
|
8
|
-
uspConsent: '1YNN'
|
|
8
|
+
uspConsent: '1YNN',
|
|
9
|
+
refererInfo: {
|
|
10
|
+
domain: 'example.com',
|
|
11
|
+
page: 'http://example.com/index.html'
|
|
12
|
+
}
|
|
9
13
|
};
|
|
10
14
|
|
|
11
15
|
const userId = {
|
|
@@ -28,6 +32,11 @@ const validBannerBidReq = {
|
|
|
28
32
|
sizes: [[300, 250]],
|
|
29
33
|
bidId: '263be71e91dd9d',
|
|
30
34
|
auctionId: '9ad1fa8d-2297-4660-a018-b39945054746',
|
|
35
|
+
ortb2Imp: {
|
|
36
|
+
ext: {
|
|
37
|
+
gpid: '/1111/homepage#div-leftnav'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
31
40
|
userId: userId,
|
|
32
41
|
'schain': {
|
|
33
42
|
'ver': '1.0',
|
|
@@ -151,6 +160,11 @@ describe('ucfunnel Adapter', function () {
|
|
|
151
160
|
expect(request[0].bidRequest).to.equal(validBannerBidReq);
|
|
152
161
|
});
|
|
153
162
|
|
|
163
|
+
it('should set gpid if configured', function () {
|
|
164
|
+
const data = request[0].data;
|
|
165
|
+
expect(data.gpid).to.equal('/1111/homepage#div-leftnav');
|
|
166
|
+
});
|
|
167
|
+
|
|
154
168
|
it('should attach request data', function () {
|
|
155
169
|
const data = request[0].data;
|
|
156
170
|
const [ width, height ] = validBannerBidReq.sizes[0];
|
|
@@ -166,7 +180,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
166
180
|
const width = 640;
|
|
167
181
|
const height = 480;
|
|
168
182
|
validBannerBidReq.sizes = [[ width, height ]];
|
|
169
|
-
const requests = spec.buildRequests([ validBannerBidReq ]);
|
|
183
|
+
const requests = spec.buildRequests([ validBannerBidReq ], bidderRequest);
|
|
170
184
|
const data = requests[0].data;
|
|
171
185
|
expect(data.w).to.equal(width);
|
|
172
186
|
expect(data.h).to.equal(height);
|
|
@@ -180,7 +194,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
180
194
|
floor: 2.02
|
|
181
195
|
}
|
|
182
196
|
};
|
|
183
|
-
const requests = spec.buildRequests([ bid ]);
|
|
197
|
+
const requests = spec.buildRequests([ bid ], bidderRequest);
|
|
184
198
|
const data = requests[0].data;
|
|
185
199
|
expect(data.fp).to.equal(2.02);
|
|
186
200
|
});
|
|
@@ -188,7 +202,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
188
202
|
it('should set bidfloor if configured', function() {
|
|
189
203
|
let bid = Object.assign({}, validBannerBidReq);
|
|
190
204
|
bid.params.bidfloor = 2.01;
|
|
191
|
-
const requests = spec.buildRequests([ bid ]);
|
|
205
|
+
const requests = spec.buildRequests([ bid ], bidderRequest);
|
|
192
206
|
const data = requests[0].data;
|
|
193
207
|
expect(data.fp).to.equal(2.01);
|
|
194
208
|
});
|
|
@@ -202,7 +216,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
202
216
|
}
|
|
203
217
|
};
|
|
204
218
|
bid.params.bidfloor = 2.01;
|
|
205
|
-
const requests = spec.buildRequests([ bid ]);
|
|
219
|
+
const requests = spec.buildRequests([ bid ], bidderRequest);
|
|
206
220
|
const data = requests[0].data;
|
|
207
221
|
expect(data.fp).to.equal(2.01);
|
|
208
222
|
});
|
|
@@ -210,7 +224,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
210
224
|
|
|
211
225
|
describe('interpretResponse', function () {
|
|
212
226
|
describe('should support banner', function () {
|
|
213
|
-
const request = spec.buildRequests([ validBannerBidReq ]);
|
|
227
|
+
const request = spec.buildRequests([ validBannerBidReq ], bidderRequest);
|
|
214
228
|
const result = spec.interpretResponse({body: validBannerBidRes}, request[0]);
|
|
215
229
|
it('should build bid array for banner', function () {
|
|
216
230
|
expect(result.length).to.equal(1);
|
|
@@ -229,7 +243,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
229
243
|
});
|
|
230
244
|
|
|
231
245
|
describe('handle banner no ad', function () {
|
|
232
|
-
const request = spec.buildRequests([ validBannerBidReq ]);
|
|
246
|
+
const request = spec.buildRequests([ validBannerBidReq ], bidderRequest);
|
|
233
247
|
const result = spec.interpretResponse({body: invalidBannerBidRes}, request[0]);
|
|
234
248
|
it('should build bid array for banner', function () {
|
|
235
249
|
expect(result.length).to.equal(1);
|
|
@@ -247,7 +261,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
247
261
|
});
|
|
248
262
|
|
|
249
263
|
describe('handle banner cpm under bidfloor', function () {
|
|
250
|
-
const request = spec.buildRequests([ validBannerBidReq ]);
|
|
264
|
+
const request = spec.buildRequests([ validBannerBidReq ], bidderRequest);
|
|
251
265
|
const result = spec.interpretResponse({body: invalidBannerBidRes}, request[0]);
|
|
252
266
|
it('should build bid array for banner', function () {
|
|
253
267
|
expect(result.length).to.equal(1);
|
|
@@ -265,7 +279,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
265
279
|
});
|
|
266
280
|
|
|
267
281
|
describe('should support video', function () {
|
|
268
|
-
const request = spec.buildRequests([ validVideoBidReq ]);
|
|
282
|
+
const request = spec.buildRequests([ validVideoBidReq ], bidderRequest);
|
|
269
283
|
const result = spec.interpretResponse({body: validVideoBidRes}, request[0]);
|
|
270
284
|
it('should build bid array', function () {
|
|
271
285
|
expect(result.length).to.equal(1);
|
|
@@ -285,7 +299,7 @@ describe('ucfunnel Adapter', function () {
|
|
|
285
299
|
});
|
|
286
300
|
|
|
287
301
|
describe('should support native', function () {
|
|
288
|
-
const request = spec.buildRequests([ validNativeBidReq ]);
|
|
302
|
+
const request = spec.buildRequests([ validNativeBidReq ], bidderRequest);
|
|
289
303
|
const result = spec.interpretResponse({body: validNativeBidRes}, request[0]);
|
|
290
304
|
it('should build bid array', function () {
|
|
291
305
|
expect(result.length).to.equal(1);
|
package/test/spec/native_spec.js
CHANGED
|
@@ -877,6 +877,17 @@ describe('validate native', function () {
|
|
|
877
877
|
});
|
|
878
878
|
});
|
|
879
879
|
|
|
880
|
+
['bogusKey', 'clickUrl', 'privacyLink'].forEach(nativeKey => {
|
|
881
|
+
it(`should not generate an empty asset for key ${nativeKey}`, () => {
|
|
882
|
+
const ortbReq = toOrtbNativeRequest({
|
|
883
|
+
[nativeKey]: {
|
|
884
|
+
required: true
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
expect(ortbReq.assets.length).to.equal(0);
|
|
888
|
+
});
|
|
889
|
+
})
|
|
890
|
+
|
|
880
891
|
it('should convert from ortb to old-style native request', () => {
|
|
881
892
|
const openRTBRequest = {
|
|
882
893
|
'ver': '1.2',
|