prebid.js 7.32.0 → 7.34.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/.github/workflows/issue_tracker.yml +26 -15
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admaticBidAdapter.js +1 -1
- package/dist/admixerBidAdapter.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/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/arcspanRtdProvider.js +1 -0
- 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/bliinkBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagementUsp.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/emx_digitalBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.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/holidBidAdapter.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/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/lotamePanoramaIdSystem.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/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +129 -128
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/ortbConverter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/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/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/ortbConverter/processors/default.js +19 -1
- package/modules/.submodules.json +1 -0
- package/modules/admaticBidAdapter.js +2 -1
- package/modules/admixerBidAdapter.js +26 -4
- package/modules/adnuntiusBidAdapter.js +36 -38
- package/modules/arcspanRtdProvider.js +73 -0
- package/modules/arcspanRtdProvider.md +11 -0
- package/modules/bliinkBidAdapter.js +1 -1
- package/modules/consentManagementUsp.js +10 -10
- package/modules/consumableBidAdapter.js +20 -2
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/emx_digitalBidAdapter.js +9 -2
- package/modules/holidBidAdapter.js +9 -4
- package/modules/id5IdSystem.js +3 -1
- package/modules/ixBidAdapter.js +25 -6
- package/modules/kargoBidAdapter.js +5 -1
- package/modules/lotamePanoramaIdSystem.js +9 -1
- package/modules/nextMillenniumBidAdapter.js +19 -9
- package/modules/nexx360BidAdapter.js +2 -1
- package/modules/openxBidAdapter.js +5 -0
- package/modules/prebidServerBidAdapter/index.js +14 -1
- package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
- package/modules/priceFloors.js +11 -5
- package/modules/seedingAllianceBidAdapter.js +129 -116
- package/modules/seedtagBidAdapter.js +20 -6
- package/modules/targetVideoBidAdapter.js +1 -1
- package/modules/tripleliftBidAdapter.js +4 -0
- package/package.json +2 -2
- package/src/adloader.js +2 -1
- package/src/utils/promise.js +8 -0
- package/test/spec/modules/admixerBidAdapter_spec.js +140 -60
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +120 -120
- package/test/spec/modules/arcspanRtdProvider_spec.js +187 -0
- package/test/spec/modules/bliinkBidAdapter_spec.js +7 -7
- package/test/spec/modules/consentManagementUsp_spec.js +15 -2
- package/test/spec/modules/consumableBidAdapter_spec.js +46 -0
- package/test/spec/modules/emx_digitalBidAdapter_spec.js +30 -1
- package/test/spec/modules/holidBidAdapter_spec.js +29 -0
- package/test/spec/modules/ixBidAdapter_spec.js +117 -6
- package/test/spec/modules/kargoBidAdapter_spec.js +32 -0
- package/test/spec/modules/lotamePanoramaIdSystem_spec.js +16 -10
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +14 -2
- package/test/spec/modules/openxBidAdapter_spec.js +41 -0
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +41 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +138 -0
- package/test/spec/modules/priceFloors_spec.js +155 -0
- package/test/spec/modules/seedingAllianceAdapter_spec.js +66 -23
- package/test/spec/modules/seedtagBidAdapter_spec.js +58 -17
- package/test/spec/modules/targetVideoBidAdapter_spec.js +2 -2
- package/test/spec/modules/tripleliftBidAdapter_spec.js +13 -0
- package/test/spec/ortbConverter/default_processors_spec.js +23 -0
|
@@ -38,7 +38,7 @@ describe('SeedingAlliance adapter', function () {
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
it('should have default request structure', function () {
|
|
41
|
-
let keys = 'site,
|
|
41
|
+
let keys = 'site,cur,imp,regs'.split(',');
|
|
42
42
|
let validBidRequests = [{
|
|
43
43
|
bidId: 'bidId',
|
|
44
44
|
params: {}
|
|
@@ -60,14 +60,17 @@ describe('SeedingAlliance adapter', function () {
|
|
|
60
60
|
assert.equal(request.id, validBidRequests[0].auctionId);
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
it('Verify the
|
|
63
|
+
it('Verify the site url', function () {
|
|
64
|
+
let siteUrl = 'https://www.yourdomain.tld/your-directory/';
|
|
64
65
|
let validBidRequests = [{
|
|
65
66
|
bidId: 'bidId',
|
|
66
|
-
params: {
|
|
67
|
+
params: {
|
|
68
|
+
url: siteUrl
|
|
69
|
+
}
|
|
67
70
|
}];
|
|
68
71
|
let request = JSON.parse(spec.buildRequests(validBidRequests, { refererInfo: { referer: 'page' } }).data);
|
|
69
72
|
|
|
70
|
-
assert.equal(request.
|
|
73
|
+
assert.equal(request.site.page, siteUrl);
|
|
71
74
|
});
|
|
72
75
|
|
|
73
76
|
it('Verify native asset ids', function () {
|
|
@@ -109,7 +112,7 @@ describe('SeedingAlliance adapter', function () {
|
|
|
109
112
|
});
|
|
110
113
|
|
|
111
114
|
describe('interpretResponse', function () {
|
|
112
|
-
const
|
|
115
|
+
const goodNativeResponse = {
|
|
113
116
|
body: {
|
|
114
117
|
cur: 'EUR',
|
|
115
118
|
id: '4b516b80-886e-4ec0-82ae-9209e6d625fb',
|
|
@@ -136,51 +139,91 @@ describe('SeedingAlliance adapter', function () {
|
|
|
136
139
|
]
|
|
137
140
|
}
|
|
138
141
|
};
|
|
142
|
+
|
|
143
|
+
const goodBannerResponse = {
|
|
144
|
+
body: {
|
|
145
|
+
cur: 'EUR',
|
|
146
|
+
id: 'b4516b80-886e-4ec0-82ae-9209e6d625fb',
|
|
147
|
+
seatbid: [
|
|
148
|
+
{
|
|
149
|
+
seat: 'seedingAlliance',
|
|
150
|
+
bid: [{
|
|
151
|
+
adm: '<iframe src="https://domain.tld/cds/delivery?wp=0.90"></iframe>',
|
|
152
|
+
impid: 1,
|
|
153
|
+
price: 0.90,
|
|
154
|
+
h: 250,
|
|
155
|
+
w: 300
|
|
156
|
+
}]
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
139
162
|
const badResponse = { body: {
|
|
140
163
|
cur: 'EUR',
|
|
141
164
|
id: '4b516b80-886e-4ec0-82ae-9209e6d625fb',
|
|
142
165
|
seatbid: []
|
|
143
166
|
}};
|
|
144
167
|
|
|
145
|
-
const
|
|
168
|
+
const bidNativeRequest = {
|
|
146
169
|
data: {},
|
|
147
|
-
|
|
170
|
+
bidRequests: [{bidId: 'bidId1', nativeParams: {title: {required: true, len: 800}}}]
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const bidBannerRequest = {
|
|
174
|
+
data: {},
|
|
175
|
+
bidRequests: [{bidId: 'bidId1', sizes: [300, 250]}]
|
|
148
176
|
};
|
|
149
177
|
|
|
150
178
|
it('should return null if body is missing or empty', function () {
|
|
151
|
-
const result = spec.interpretResponse(badResponse,
|
|
179
|
+
const result = spec.interpretResponse(badResponse, bidNativeRequest);
|
|
152
180
|
assert.equal(result.length, 0);
|
|
153
181
|
|
|
154
182
|
delete badResponse.body
|
|
155
183
|
|
|
156
|
-
const result1 = spec.interpretResponse(badResponse,
|
|
184
|
+
const result1 = spec.interpretResponse(badResponse, bidNativeRequest);
|
|
157
185
|
assert.equal(result.length, 0);
|
|
158
186
|
});
|
|
159
187
|
|
|
160
188
|
it('should return the correct params', function () {
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
assert.deepEqual(
|
|
165
|
-
assert.deepEqual(
|
|
166
|
-
assert.deepEqual(
|
|
167
|
-
assert.deepEqual(
|
|
168
|
-
assert.deepEqual(
|
|
169
|
-
assert.deepEqual(
|
|
189
|
+
const resultNative = spec.interpretResponse(goodNativeResponse, bidNativeRequest);
|
|
190
|
+
const bidNative = goodNativeResponse.body.seatbid[0].bid[0];
|
|
191
|
+
|
|
192
|
+
assert.deepEqual(resultNative[0].bidderCode, 'seedingAlliance');
|
|
193
|
+
assert.deepEqual(resultNative[0].currency, goodNativeResponse.body.cur);
|
|
194
|
+
assert.deepEqual(resultNative[0].requestId, bidNativeRequest.bidRequests[0].bidId);
|
|
195
|
+
assert.deepEqual(resultNative[0].cpm, bidNative.price);
|
|
196
|
+
assert.deepEqual(resultNative[0].creativeId, bidNative.crid);
|
|
197
|
+
assert.deepEqual(resultNative[0].mediaType, 'native');
|
|
198
|
+
|
|
199
|
+
const resultBanner = spec.interpretResponse(goodBannerResponse, bidBannerRequest);
|
|
200
|
+
|
|
201
|
+
assert.deepEqual(resultBanner[0].bidderCode, 'seedingAlliance');
|
|
202
|
+
assert.deepEqual(resultBanner[0].mediaType, 'banner');
|
|
203
|
+
assert.deepEqual(resultBanner[0].width, bidBannerRequest.bidRequests[0].sizes[0]);
|
|
204
|
+
assert.deepEqual(resultBanner[0].height, bidBannerRequest.bidRequests[0].sizes[1]);
|
|
170
205
|
});
|
|
171
206
|
|
|
172
|
-
it('should return the correct tracking links', function () {
|
|
173
|
-
const result = spec.interpretResponse(
|
|
174
|
-
const bid =
|
|
207
|
+
it('should return the correct native tracking links', function () {
|
|
208
|
+
const result = spec.interpretResponse(goodNativeResponse, bidNativeRequest);
|
|
209
|
+
const bid = goodNativeResponse.body.seatbid[0].bid[0];
|
|
175
210
|
const regExpPrice = new RegExp('price=' + bid.price);
|
|
176
211
|
|
|
177
212
|
result[0].native.clickTrackers.forEach(function (clickTracker) {
|
|
178
|
-
|
|
213
|
+
assert.ok(clickTracker.search(regExpPrice) > -1);
|
|
179
214
|
});
|
|
180
215
|
|
|
181
216
|
result[0].native.impressionTrackers.forEach(function (impTracker) {
|
|
182
|
-
|
|
217
|
+
assert.ok(impTracker.search(regExpPrice) > -1);
|
|
183
218
|
});
|
|
184
219
|
});
|
|
220
|
+
|
|
221
|
+
it('should return the correct banner content', function () {
|
|
222
|
+
const result = spec.interpretResponse(goodBannerResponse, bidBannerRequest);
|
|
223
|
+
const bid = goodBannerResponse.body.seatbid[0].bid[0];
|
|
224
|
+
const regExpContent = new RegExp('<iframe.+?' + bid.price + '.+?</iframe>');
|
|
225
|
+
|
|
226
|
+
assert.ok(result[0].ad.search(regExpContent) > -1);
|
|
227
|
+
});
|
|
185
228
|
});
|
|
186
229
|
});
|
|
@@ -33,30 +33,60 @@ function createInStreamSlotConfig(mediaType) {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
const createBannerSlotConfig = (placement, mediatypes) => {
|
|
37
|
+
return getSlotConfigs(mediatypes || { banner: {} }, {
|
|
38
|
+
publisherId: PUBLISHER_ID,
|
|
39
|
+
adUnitId: ADUNIT_ID,
|
|
40
|
+
placement,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
36
44
|
describe('Seedtag Adapter', function () {
|
|
37
45
|
describe('isBidRequestValid method', function () {
|
|
38
46
|
describe('returns true', function () {
|
|
39
47
|
describe('when banner slot config has all mandatory params', () => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
publisherId: PUBLISHER_ID,
|
|
46
|
-
adUnitId: ADUNIT_ID,
|
|
47
|
-
placement,
|
|
48
|
-
}
|
|
48
|
+
const placements = ['inBanner', 'inImage', 'inScreen', 'inArticle'];
|
|
49
|
+
placements.forEach((placement) => {
|
|
50
|
+
it(placement + 'should be valid', function () {
|
|
51
|
+
const isBidRequestValid = spec.isBidRequestValid(
|
|
52
|
+
createBannerSlotConfig(placement)
|
|
49
53
|
);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
expect(isBidRequestValid).to.equal(true);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it(
|
|
58
|
+
placement +
|
|
59
|
+
' should be valid when has display and video mediatypes, and video context is outstream',
|
|
60
|
+
function () {
|
|
54
61
|
const isBidRequestValid = spec.isBidRequestValid(
|
|
55
|
-
createBannerSlotConfig(placement
|
|
62
|
+
createBannerSlotConfig(placement, {
|
|
63
|
+
banner: {},
|
|
64
|
+
video: {
|
|
65
|
+
context: 'outstream',
|
|
66
|
+
playerSize: [[600, 200]],
|
|
67
|
+
},
|
|
68
|
+
})
|
|
56
69
|
);
|
|
57
70
|
expect(isBidRequestValid).to.equal(true);
|
|
58
|
-
}
|
|
59
|
-
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
it(
|
|
75
|
+
placement +
|
|
76
|
+
" shouldn't be valid when has display and video mediatypes, and video context is instream",
|
|
77
|
+
function () {
|
|
78
|
+
const isBidRequestValid = spec.isBidRequestValid(
|
|
79
|
+
createBannerSlotConfig(placement, {
|
|
80
|
+
banner: {},
|
|
81
|
+
video: {
|
|
82
|
+
context: 'instream',
|
|
83
|
+
playerSize: [[600, 200]],
|
|
84
|
+
},
|
|
85
|
+
})
|
|
86
|
+
);
|
|
87
|
+
expect(isBidRequestValid).to.equal(false);
|
|
88
|
+
}
|
|
89
|
+
);
|
|
60
90
|
});
|
|
61
91
|
});
|
|
62
92
|
describe('when video slot has all mandatory params', function () {
|
|
@@ -70,7 +100,18 @@ describe('Seedtag Adapter', function () {
|
|
|
70
100
|
const isBidRequestValid = spec.isBidRequestValid(slotConfig);
|
|
71
101
|
expect(isBidRequestValid).to.equal(true);
|
|
72
102
|
});
|
|
73
|
-
it('should return true, when video context is instream
|
|
103
|
+
it('should return true, when video context is instream and mediatype is video and banner', function () {
|
|
104
|
+
const slotConfig = createInStreamSlotConfig({
|
|
105
|
+
video: {
|
|
106
|
+
context: 'instream',
|
|
107
|
+
playerSize: [[600, 200]],
|
|
108
|
+
},
|
|
109
|
+
banner: {},
|
|
110
|
+
});
|
|
111
|
+
const isBidRequestValid = spec.isBidRequestValid(slotConfig);
|
|
112
|
+
expect(isBidRequestValid).to.equal(true);
|
|
113
|
+
});
|
|
114
|
+
it('should return false, when video context is instream, but placement is not inStream', function () {
|
|
74
115
|
const slotConfig = getSlotConfigs(
|
|
75
116
|
{
|
|
76
117
|
video: {
|
|
@@ -58,7 +58,7 @@ describe('TargetVideo Bid Adapter', function() {
|
|
|
58
58
|
'uuid': '84ab500420319d',
|
|
59
59
|
'ads': [{
|
|
60
60
|
'ad_type': 'video',
|
|
61
|
-
'cpm': 0.
|
|
61
|
+
'cpm': 0.675000,
|
|
62
62
|
'notify_url': 'https://www.target-video.com/',
|
|
63
63
|
'rtb': {
|
|
64
64
|
'video': {
|
|
@@ -87,7 +87,7 @@ describe('TargetVideo Bid Adapter', function() {
|
|
|
87
87
|
|
|
88
88
|
const bid = bidResponse[0];
|
|
89
89
|
expect(bid).to.not.be.empty;
|
|
90
|
-
expect(bid.cpm).to.equal(0.
|
|
90
|
+
expect(bid.cpm).to.equal(0.5);
|
|
91
91
|
expect(bid.width).to.equal(300);
|
|
92
92
|
expect(bid.height).to.equal(250);
|
|
93
93
|
expect(bid.ad).to.include('<script src="https://player.target-video.com/custom/targetvideo-banner.js"></script>')
|
|
@@ -1168,6 +1168,19 @@ describe('triplelift adapter', function () {
|
|
|
1168
1168
|
}
|
|
1169
1169
|
})
|
|
1170
1170
|
});
|
|
1171
|
+
it('should add gpp consent data to bid request object if gpp data exists', function() {
|
|
1172
|
+
bidderRequest.ortb2 = {
|
|
1173
|
+
regs: {
|
|
1174
|
+
'gpp': 'BOJ/P2HOJ/P2HABABMAAAAAZ+A==',
|
|
1175
|
+
'gpp_sid': [7]
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
|
|
1179
|
+
expect(request.data.regs).to.deep.equal({
|
|
1180
|
+
'gpp': 'BOJ/P2HOJ/P2HABABMAAAAAZ+A==',
|
|
1181
|
+
'gpp_sid': [7]
|
|
1182
|
+
})
|
|
1183
|
+
});
|
|
1171
1184
|
});
|
|
1172
1185
|
|
|
1173
1186
|
describe('interpretResponse', function () {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {onlyOneClientSection} from '../../../libraries/ortbConverter/processors/default.js';
|
|
2
|
+
|
|
3
|
+
describe('onlyOneClientSection', () => {
|
|
4
|
+
[
|
|
5
|
+
[['app'], 'app'],
|
|
6
|
+
[['site'], 'site'],
|
|
7
|
+
[['dooh'], 'dooh'],
|
|
8
|
+
[['app', 'site'], 'app'],
|
|
9
|
+
[['dooh', 'app', 'site'], 'dooh'],
|
|
10
|
+
[['dooh', 'site'], 'dooh']
|
|
11
|
+
].forEach(([sections, winner]) => {
|
|
12
|
+
it(`should leave only ${winner} in request when it contains ${sections.join(', ')}`, () => {
|
|
13
|
+
const req = Object.fromEntries(sections.map(s => [s, {foo: 'bar'}]));
|
|
14
|
+
onlyOneClientSection(req);
|
|
15
|
+
expect(Object.keys(req)).to.eql([winner]);
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
it('should not choke if none of the sections are in the request', () => {
|
|
19
|
+
const req = {};
|
|
20
|
+
onlyOneClientSection(req);
|
|
21
|
+
expect(req).to.eql({});
|
|
22
|
+
});
|
|
23
|
+
});
|