prebid.js 6.26.0 → 6.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/adWMGAnalyticsAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
- package/dist/adlooxAdServerVideo.js +1 -1
- package/dist/adlooxAnalyticsAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adomikAnalyticsAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adxpremiumAnalyticsAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/akamaiDapRtdProvider.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/atsAnalyticsAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/colossussspBidAdapter.js +1 -1
- package/dist/concertAnalyticsAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.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/datablocksAnalyticsAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningAnalyticsAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- package/dist/ftrackIdSystem.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/hadronAnalyticsAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.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/invisiblyAnalyticsAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/koblerBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/livewrappedAnalyticsAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/naveggIdSystem.js +1 -1
- package/dist/not-for-prod/prebid.js +153 -152
- package/dist/novatiqIdSystem.js +1 -1
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/oneVideoBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxAnalyticsAdapter.js +1 -1
- package/dist/optimonAnalyticsAdapter.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 +3 -3
- package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubperfAnalyticsAdapter.js +1 -1
- package/dist/pubstackAnalyticsAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pulsepointAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/realvuAnalyticsAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/relevantAnalyticsAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rivrAnalyticsAdapter.js +1 -1
- package/dist/roxotAnalyticsAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/scaleableAnalyticsAdapter.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/sigmoidAnalyticsAdapter.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/sonobiAnalyticsAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sortableAnalyticsAdapter.js +1 -1
- package/dist/sortableBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/staqAnalyticsAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -0
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/trustxBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.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/dist/yuktamediaAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/akamaidap_segments_example.html +5 -3
- package/modules/.submodules.json +1 -0
- package/modules/adlooxAnalyticsAdapter.js +9 -5
- package/modules/adlooxAnalyticsAdapter.md +3 -3
- package/modules/adlooxRtdProvider.js +3 -5
- package/modules/adlooxRtdProvider.md +2 -2
- package/modules/akamaiDapRtdProvider.js +460 -130
- package/modules/akamaiDapRtdProvider.md +5 -3
- package/modules/colossussspBidAdapter.js +17 -17
- package/modules/conversantBidAdapter.js +2 -2
- package/modules/ftrackIdSystem.js +3 -4
- package/modules/hadronAnalyticsAdapter.js +5 -1
- package/modules/koblerBidAdapter.js +54 -45
- package/modules/koblerBidAdapter.md +12 -17
- package/modules/naveggIdSystem.js +3 -2
- package/modules/novatiqIdSystem.js +6 -1
- package/modules/relaidoBidAdapter.js +0 -3
- package/modules/taboolaBidAdapter.js +265 -0
- package/modules/taboolaBidAdapter.md +49 -0
- package/package.json +1 -1
- package/src/AnalyticsAdapter.js +5 -1
- package/src/adloader.js +2 -1
- package/test/mocks/analyticsStub.js +13 -0
- package/test/mocks/xhr.js +22 -0
- package/test/spec/AnalyticsAdapter_spec.js +4 -0
- package/test/spec/modules/akamaiDapRtdProvider_spec.js +402 -108
- package/test/spec/modules/conversantBidAdapter_spec.js +36 -5
- package/test/spec/modules/datablocksBidAdapter_spec.js +9 -8
- package/test/spec/modules/fintezaAnalyticsAdapter_spec.js +4 -4
- package/test/spec/modules/ftrackIdSystem_spec.js +1 -9
- package/test/spec/modules/koblerBidAdapter_spec.js +160 -124
- package/test/spec/modules/naveggIdSystem_spec.js +25 -1
- package/test/spec/modules/proxistoreBidAdapter_spec.js +0 -2
- package/test/spec/modules/sovrnBidAdapter_spec.js +253 -264
- package/test/spec/modules/taboolaBidAdapter_spec.js +455 -0
- package/test/test_deps.js +1 -0
|
@@ -1,92 +1,91 @@
|
|
|
1
|
-
import {expect} from 'chai'
|
|
2
|
-
import {spec} from 'modules/sovrnBidAdapter.js'
|
|
3
|
-
import {config} from 'src/config.js'
|
|
1
|
+
import {expect} from 'chai'
|
|
2
|
+
import {spec} from 'modules/sovrnBidAdapter.js'
|
|
3
|
+
import {config} from 'src/config.js'
|
|
4
4
|
import * as utils from 'src/utils.js'
|
|
5
5
|
|
|
6
|
-
const ENDPOINT = `https://ap.lijit.com/rtb/bid?src=$$REPO_AND_VERSION
|
|
6
|
+
const ENDPOINT = `https://ap.lijit.com/rtb/bid?src=$$REPO_AND_VERSION$$`
|
|
7
7
|
|
|
8
8
|
const baseBidRequest = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
bidder: 'sovrn',
|
|
10
|
+
params: {
|
|
11
|
+
tagid: 403370
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
adUnitCode: 'adunit-code',
|
|
14
|
+
sizes: [
|
|
15
15
|
[300, 250],
|
|
16
16
|
[300, 600]
|
|
17
17
|
],
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
bidId: '30b31c1838de1e',
|
|
19
|
+
bidderRequestId: '22edbae2733bf6',
|
|
20
|
+
auctionId: '1d1a030790a475',
|
|
21
21
|
}
|
|
22
22
|
const baseBidderRequest = {
|
|
23
23
|
refererInfo: {
|
|
24
24
|
referer: 'http://example.com/page.html',
|
|
25
25
|
}
|
|
26
|
-
}
|
|
26
|
+
}
|
|
27
27
|
|
|
28
28
|
describe('sovrnBidAdapter', function() {
|
|
29
29
|
describe('isBidRequestValid', function () {
|
|
30
30
|
it('should return true when required params found', function () {
|
|
31
|
-
expect(spec.isBidRequestValid(baseBidRequest)).to.equal(true)
|
|
32
|
-
})
|
|
31
|
+
expect(spec.isBidRequestValid(baseBidRequest)).to.equal(true)
|
|
32
|
+
})
|
|
33
33
|
|
|
34
34
|
it('should return false when tagid not passed correctly', function () {
|
|
35
35
|
const bidRequest = {
|
|
36
36
|
...baseBidRequest,
|
|
37
|
-
|
|
37
|
+
params: {
|
|
38
38
|
...baseBidRequest.params,
|
|
39
|
-
|
|
39
|
+
tagid: 'ABCD'
|
|
40
40
|
},
|
|
41
|
-
}
|
|
41
|
+
}
|
|
42
42
|
|
|
43
|
-
expect(spec.isBidRequestValid(bidRequest)).to.equal(false)
|
|
44
|
-
})
|
|
43
|
+
expect(spec.isBidRequestValid(bidRequest)).to.equal(false)
|
|
44
|
+
})
|
|
45
45
|
|
|
46
46
|
it('should return false when require params are not passed', function () {
|
|
47
47
|
const bidRequest = {
|
|
48
48
|
...baseBidRequest,
|
|
49
|
-
|
|
49
|
+
params: {}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
expect(spec.isBidRequestValid(bidRequest)).to.equal(false)
|
|
53
|
-
})
|
|
52
|
+
expect(spec.isBidRequestValid(bidRequest)).to.equal(false)
|
|
53
|
+
})
|
|
54
54
|
|
|
55
55
|
it('should return false when require video params are not passed', function () {
|
|
56
56
|
const bidRequest = {
|
|
57
57
|
...baseBidRequest,
|
|
58
|
-
|
|
58
|
+
mediaTypes: {
|
|
59
59
|
'video': {
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
expect(spec.isBidRequestValid(bidRequest)).to.equal(false)
|
|
65
|
-
})
|
|
66
|
-
})
|
|
64
|
+
expect(spec.isBidRequestValid(bidRequest)).to.equal(false)
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
67
|
|
|
68
68
|
describe('buildRequests', function () {
|
|
69
69
|
describe('basic bid parameters', function() {
|
|
70
|
-
const request = spec.buildRequests([baseBidRequest], baseBidderRequest)
|
|
71
|
-
const payload = JSON.parse(request.data)
|
|
70
|
+
const request = spec.buildRequests([baseBidRequest], baseBidderRequest)
|
|
71
|
+
const payload = JSON.parse(request.data)
|
|
72
72
|
|
|
73
73
|
it('sends bid request to our endpoint via POST', function () {
|
|
74
|
-
expect(request.method).to.equal('POST')
|
|
75
|
-
})
|
|
74
|
+
expect(request.method).to.equal('POST')
|
|
75
|
+
})
|
|
76
76
|
|
|
77
77
|
it('attaches source and version to endpoint URL as query params', function () {
|
|
78
78
|
expect(request.url).to.equal(ENDPOINT)
|
|
79
|
-
})
|
|
79
|
+
})
|
|
80
80
|
|
|
81
81
|
it('sets the proper banner object', function() {
|
|
82
82
|
const bannerBidRequest = {
|
|
83
83
|
...baseBidRequest,
|
|
84
|
-
|
|
84
|
+
mediaTypes: {
|
|
85
85
|
banner: {}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
const request = spec.buildRequests([bannerBidRequest], baseBidderRequest)
|
|
89
|
-
|
|
90
89
|
const payload = JSON.parse(request.data)
|
|
91
90
|
const impression = payload.imp[0]
|
|
92
91
|
|
|
@@ -105,7 +104,7 @@ describe('sovrnBidAdapter', function() {
|
|
|
105
104
|
const startdelay = 0
|
|
106
105
|
const videoBidRequest = {
|
|
107
106
|
...baseBidRequest,
|
|
108
|
-
|
|
107
|
+
mediaTypes: {
|
|
109
108
|
video: {
|
|
110
109
|
mimes,
|
|
111
110
|
protocols,
|
|
@@ -117,7 +116,6 @@ describe('sovrnBidAdapter', function() {
|
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
const request = spec.buildRequests([videoBidRequest], baseBidderRequest)
|
|
120
|
-
|
|
121
119
|
const payload = JSON.parse(request.data)
|
|
122
120
|
const impression = payload.imp[0]
|
|
123
121
|
|
|
@@ -131,9 +129,9 @@ describe('sovrnBidAdapter', function() {
|
|
|
131
129
|
})
|
|
132
130
|
|
|
133
131
|
it('gets correct site info', function() {
|
|
134
|
-
expect(payload.site.page).to.equal('http://example.com/page.html')
|
|
135
|
-
expect(payload.site.domain).to.equal('example.com')
|
|
136
|
-
})
|
|
132
|
+
expect(payload.site.page).to.equal('http://example.com/page.html')
|
|
133
|
+
expect(payload.site.domain).to.equal('example.com')
|
|
134
|
+
})
|
|
137
135
|
|
|
138
136
|
it('includes the ad unit code in the request', function() {
|
|
139
137
|
const impression = payload.imp[0]
|
|
@@ -142,22 +140,21 @@ describe('sovrnBidAdapter', function() {
|
|
|
142
140
|
|
|
143
141
|
it('converts tagid to string', function () {
|
|
144
142
|
expect(request.data).to.contain('"tagid":"403370"')
|
|
145
|
-
})
|
|
143
|
+
})
|
|
146
144
|
})
|
|
147
145
|
|
|
148
146
|
it('accepts a single array as a size', function() {
|
|
149
147
|
const singleSizeBidRequest = {
|
|
150
148
|
...baseBidRequest,
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
params: {
|
|
150
|
+
iv: 'vet'
|
|
153
151
|
},
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
sizes: [300, 250],
|
|
153
|
+
mediaTypes: {
|
|
156
154
|
banner: {}
|
|
157
155
|
},
|
|
158
156
|
}
|
|
159
157
|
const request = spec.buildRequests([singleSizeBidRequest], baseBidderRequest)
|
|
160
|
-
|
|
161
158
|
const payload = JSON.parse(request.data)
|
|
162
159
|
const impression = payload.imp[0]
|
|
163
160
|
|
|
@@ -176,22 +173,21 @@ describe('sovrnBidAdapter', function() {
|
|
|
176
173
|
const request = spec.buildRequests([ivBidRequest], baseBidderRequest)
|
|
177
174
|
|
|
178
175
|
expect(request.url).to.contain('iv=vet')
|
|
179
|
-
})
|
|
176
|
+
})
|
|
180
177
|
|
|
181
178
|
it('sends gdpr info if exists', function () {
|
|
182
179
|
const bidderRequest = {
|
|
183
180
|
...baseBidderRequest,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
181
|
+
bidderCode: 'sovrn',
|
|
182
|
+
auctionId: '1d1a030790a475',
|
|
183
|
+
bidderRequestId: '22edbae2733bf6',
|
|
184
|
+
timeout: 3000,
|
|
185
|
+
gdprConsent: {
|
|
186
|
+
consentString: 'BOJ8RZsOJ8RZsABAB8AAAAAZ+A==',
|
|
187
|
+
gdprApplies: true
|
|
191
188
|
},
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
189
|
+
bids: [baseBidRequest]
|
|
190
|
+
}
|
|
195
191
|
const { regs, user } = JSON.parse(spec.buildRequests([baseBidRequest], bidderRequest).data)
|
|
196
192
|
|
|
197
193
|
expect(regs.ext.gdpr).to.exist.and.to.be.a('number')
|
|
@@ -203,14 +199,13 @@ describe('sovrnBidAdapter', function() {
|
|
|
203
199
|
it('should send us_privacy if bidderRequest has a value for uspConsent', function () {
|
|
204
200
|
const bidderRequest = {
|
|
205
201
|
...baseBidderRequest,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
202
|
+
bidderCode: 'sovrn',
|
|
203
|
+
auctionId: '1d1a030790a475',
|
|
204
|
+
bidderRequestId: '22edbae2733bf6',
|
|
205
|
+
timeout: 3000,
|
|
206
|
+
uspConsent: '1NYN',
|
|
207
|
+
bids: [baseBidRequest]
|
|
212
208
|
}
|
|
213
|
-
|
|
214
209
|
const data = JSON.parse(spec.buildRequests([baseBidRequest], bidderRequest).data)
|
|
215
210
|
|
|
216
211
|
expect(data.regs.ext['us_privacy']).to.equal(bidderRequest.uspConsent)
|
|
@@ -219,21 +214,20 @@ describe('sovrnBidAdapter', function() {
|
|
|
219
214
|
it('should add schain if present', function() {
|
|
220
215
|
const schainRequest = {
|
|
221
216
|
...baseBidRequest,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
217
|
+
schain: {
|
|
218
|
+
ver: '1.0',
|
|
219
|
+
complete: 1,
|
|
220
|
+
nodes: [
|
|
226
221
|
{
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
222
|
+
asi: 'directseller.com',
|
|
223
|
+
sid: '00001',
|
|
224
|
+
rid: 'BidRequest1',
|
|
225
|
+
hp: 1
|
|
231
226
|
}
|
|
232
227
|
]
|
|
233
228
|
}
|
|
234
229
|
}
|
|
235
230
|
const schainRequests = [schainRequest, baseBidRequest]
|
|
236
|
-
|
|
237
231
|
const data = JSON.parse(spec.buildRequests(schainRequests, baseBidderRequest).data)
|
|
238
232
|
|
|
239
233
|
expect(data.source.ext.schain.nodes.length).to.equal(1)
|
|
@@ -248,7 +242,6 @@ describe('sovrnBidAdapter', function() {
|
|
|
248
242
|
}
|
|
249
243
|
}
|
|
250
244
|
const criteoIdRequests = [criteoIdRequest, baseBidRequest]
|
|
251
|
-
|
|
252
245
|
const ext = JSON.parse(spec.buildRequests(criteoIdRequests, baseBidderRequest).data).user.ext
|
|
253
246
|
const firstEID = ext.eids[0]
|
|
254
247
|
const secondEID = ext.eids[1]
|
|
@@ -294,7 +287,6 @@ describe('sovrnBidAdapter', function() {
|
|
|
294
287
|
bidfloor: 2.00
|
|
295
288
|
}
|
|
296
289
|
}
|
|
297
|
-
|
|
298
290
|
const request = spec.buildRequests([floorBid], baseBidderRequest)
|
|
299
291
|
const payload = JSON.parse(request.data)
|
|
300
292
|
|
|
@@ -309,7 +301,6 @@ describe('sovrnBidAdapter', function() {
|
|
|
309
301
|
tagid: 1234,
|
|
310
302
|
bidfloor: 2.00
|
|
311
303
|
}
|
|
312
|
-
|
|
313
304
|
const request = spec.buildRequests([floorBid], baseBidderRequest)
|
|
314
305
|
const impression = JSON.parse(request.data).imp[0]
|
|
315
306
|
|
|
@@ -359,7 +350,6 @@ describe('sovrnBidAdapter', function() {
|
|
|
359
350
|
}
|
|
360
351
|
}
|
|
361
352
|
}
|
|
362
|
-
|
|
363
353
|
const request = spec.buildRequests([fpdBidRequest], baseBidderRequest)
|
|
364
354
|
const payload = JSON.parse(request.data)
|
|
365
355
|
|
|
@@ -381,7 +371,6 @@ describe('sovrnBidAdapter', function() {
|
|
|
381
371
|
}
|
|
382
372
|
}
|
|
383
373
|
}
|
|
384
|
-
|
|
385
374
|
const request = spec.buildRequests([fpdBid], baseBidderRequest)
|
|
386
375
|
const impression = JSON.parse(request.data).imp[0]
|
|
387
376
|
|
|
@@ -390,102 +379,109 @@ describe('sovrnBidAdapter', function() {
|
|
|
390
379
|
expect(impression.ext.deals).to.deep.equal(['seg1', 'seg2'])
|
|
391
380
|
})
|
|
392
381
|
})
|
|
393
|
-
})
|
|
382
|
+
})
|
|
394
383
|
|
|
395
384
|
describe('interpretResponse', function () {
|
|
396
|
-
let response
|
|
385
|
+
let response
|
|
397
386
|
const baseResponse = {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
387
|
+
requestId: '263c448586f5a1',
|
|
388
|
+
cpm: 0.45882675,
|
|
389
|
+
width: 728,
|
|
390
|
+
height: 90,
|
|
391
|
+
creativeId: 'creativelycreatedcreativecreative',
|
|
392
|
+
dealId: null,
|
|
393
|
+
currency: 'USD',
|
|
394
|
+
netRevenue: true,
|
|
395
|
+
mediaType: 'banner',
|
|
396
|
+
ttl: 90,
|
|
397
|
+
meta: { advertiserDomains: [] },
|
|
398
|
+
ad: decodeURIComponent(`<!-- Creative --><img src="<!-- NURL -->">`),
|
|
410
399
|
}
|
|
411
400
|
const videoBid = {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
401
|
+
id: 'a_403370_332fdb9b064040ddbec05891bd13ab28',
|
|
402
|
+
crid: 'creativelycreatedcreativecreative',
|
|
403
|
+
impid: '263c448586f5a1',
|
|
404
|
+
price: 0.45882675,
|
|
405
|
+
nurl: '',
|
|
406
|
+
adm: '<VAST version="4.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.iab.com/VAST">key%3Dvalue</VAST>',
|
|
407
|
+
h: 480,
|
|
408
|
+
w: 640
|
|
420
409
|
}
|
|
421
410
|
const bannerBid = {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
411
|
+
id: 'a_403370_332fdb9b064040ddbec05891bd13ab28',
|
|
412
|
+
crid: 'creativelycreatedcreativecreative',
|
|
413
|
+
impid: '263c448586f5a1',
|
|
414
|
+
price: 0.45882675,
|
|
415
|
+
nurl: '<!-- NURL -->',
|
|
416
|
+
adm: '<!-- Creative -->',
|
|
417
|
+
h: 90,
|
|
418
|
+
w: 728
|
|
430
419
|
}
|
|
420
|
+
|
|
431
421
|
beforeEach(function () {
|
|
432
422
|
response = {
|
|
433
423
|
body: {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
424
|
+
id: '37386aade21a71',
|
|
425
|
+
seatbid: [{
|
|
426
|
+
bid: [{
|
|
437
427
|
...bannerBid
|
|
438
428
|
}]
|
|
439
429
|
}]
|
|
440
430
|
}
|
|
441
|
-
}
|
|
442
|
-
})
|
|
431
|
+
}
|
|
432
|
+
})
|
|
443
433
|
|
|
444
434
|
it('should get the correct bid response', function () {
|
|
445
435
|
const expectedResponse = {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
436
|
+
requestId: '263c448586f5a1',
|
|
437
|
+
cpm: 0.45882675,
|
|
438
|
+
width: 728,
|
|
439
|
+
height: 90,
|
|
440
|
+
creativeId: 'creativelycreatedcreativecreative',
|
|
441
|
+
dealId: null,
|
|
442
|
+
currency: 'USD',
|
|
443
|
+
netRevenue: true,
|
|
444
|
+
mediaType: 'banner',
|
|
445
|
+
ttl: 60000,
|
|
446
|
+
meta: { advertiserDomains: [] },
|
|
447
|
+
ad: decodeURIComponent(`<!-- Creative --><img src=<!-- NURL -->>`)
|
|
448
|
+
}
|
|
449
|
+
const result = spec.interpretResponse(response)
|
|
451
450
|
|
|
452
|
-
expect(result[0]).to.
|
|
453
|
-
})
|
|
451
|
+
expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedResponse))
|
|
452
|
+
})
|
|
454
453
|
|
|
455
454
|
it('crid should default to the bid id if not on the response', function () {
|
|
456
|
-
delete response.body.seatbid[0].bid[0].crid
|
|
455
|
+
delete response.body.seatbid[0].bid[0].crid
|
|
457
456
|
|
|
458
457
|
const expectedResponse = {
|
|
459
458
|
...baseResponse,
|
|
460
|
-
|
|
461
|
-
|
|
459
|
+
creativeId: response.body.seatbid[0].bid[0].id,
|
|
460
|
+
ad: decodeURIComponent(`<!-- Creative --><img src="<!-- NURL -->">`),
|
|
462
461
|
}
|
|
462
|
+
const result = spec.interpretResponse(response)
|
|
463
463
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
expect(result[0]).to.deep.equal(expectedResponse);
|
|
467
|
-
});
|
|
464
|
+
expect(result[0]).to.deep.equal(expectedResponse)
|
|
465
|
+
})
|
|
468
466
|
|
|
469
467
|
it('should get correct bid response when dealId is passed', function () {
|
|
470
|
-
response.body.seatbid[0].bid[0].dealid = 'baking'
|
|
468
|
+
response.body.seatbid[0].bid[0].dealid = 'baking'
|
|
471
469
|
const expectedResponse = {
|
|
472
470
|
...baseResponse,
|
|
473
|
-
|
|
471
|
+
dealId: 'baking',
|
|
474
472
|
}
|
|
475
|
-
|
|
476
473
|
const result = spec.interpretResponse(response)
|
|
477
474
|
|
|
478
|
-
expect(result[0]).to.deep.equal(expectedResponse)
|
|
479
|
-
})
|
|
475
|
+
expect(result[0]).to.deep.equal(expectedResponse)
|
|
476
|
+
})
|
|
480
477
|
|
|
481
478
|
it('should get correct bid response when ttl is set', function () {
|
|
482
|
-
response.body.seatbid[0].bid[0].ext = {
|
|
479
|
+
response.body.seatbid[0].bid[0].ext = { ttl: 480 }
|
|
483
480
|
|
|
484
481
|
const expectedResponse = {
|
|
485
482
|
...baseResponse,
|
|
486
|
-
|
|
483
|
+
ttl: 480,
|
|
487
484
|
}
|
|
488
|
-
|
|
489
485
|
const result = spec.interpretResponse(response)
|
|
490
486
|
|
|
491
487
|
expect(result[0]).to.deep.equal(expectedResponse)
|
|
@@ -494,20 +490,19 @@ describe('sovrnBidAdapter', function() {
|
|
|
494
490
|
it('handles empty bid response', function () {
|
|
495
491
|
const response = {
|
|
496
492
|
body: {
|
|
497
|
-
|
|
498
|
-
|
|
493
|
+
id: '37386aade21a71',
|
|
494
|
+
seatbid: []
|
|
499
495
|
}
|
|
500
|
-
}
|
|
501
|
-
|
|
496
|
+
}
|
|
502
497
|
const result = spec.interpretResponse(response)
|
|
503
498
|
|
|
504
|
-
expect(result.length).to.equal(0)
|
|
505
|
-
})
|
|
499
|
+
expect(result.length).to.equal(0)
|
|
500
|
+
})
|
|
506
501
|
|
|
507
502
|
it('should get the correct bid response with 2 different bids', function () {
|
|
508
503
|
const expectedVideoResponse = {
|
|
509
504
|
...baseResponse,
|
|
510
|
-
|
|
505
|
+
vastXml: decodeURIComponent(videoBid.adm)
|
|
511
506
|
}
|
|
512
507
|
delete expectedVideoResponse.ad
|
|
513
508
|
|
|
@@ -533,90 +528,87 @@ describe('sovrnBidAdapter', function() {
|
|
|
533
528
|
expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedResponse))
|
|
534
529
|
expect(Object.keys(result[1])).to.deep.equal(Object.keys(expectedResponse))
|
|
535
530
|
})
|
|
536
|
-
})
|
|
531
|
+
})
|
|
537
532
|
|
|
538
533
|
describe('interpretResponse video', function () {
|
|
539
|
-
let videoResponse
|
|
540
|
-
const bidAdm = '<VAST version="4.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.iab.com/VAST">key%3Dvalue</VAST>'
|
|
541
|
-
const decodedBidAdm = decodeURIComponent(bidAdm)
|
|
534
|
+
let videoResponse
|
|
535
|
+
const bidAdm = '<VAST version="4.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.iab.com/VAST">key%3Dvalue</VAST>'
|
|
536
|
+
const decodedBidAdm = decodeURIComponent(bidAdm)
|
|
542
537
|
const baseVideoResponse = {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
538
|
+
requestId: '263c448586f5a1',
|
|
539
|
+
cpm: 0.45882675,
|
|
540
|
+
width: 640,
|
|
541
|
+
height: 480,
|
|
542
|
+
creativeId: 'creativelycreatedcreativecreative',
|
|
543
|
+
dealId: null,
|
|
544
|
+
currency: 'USD',
|
|
545
|
+
netRevenue: true,
|
|
546
|
+
mediaType: 'video',
|
|
547
|
+
ttl: 90,
|
|
548
|
+
meta: { advertiserDomains: [] },
|
|
549
|
+
vastXml: decodedBidAdm
|
|
555
550
|
}
|
|
551
|
+
|
|
556
552
|
beforeEach(function () {
|
|
557
553
|
videoResponse = {
|
|
558
554
|
body: {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
555
|
+
id: '37386aade21a71',
|
|
556
|
+
seatbid: [{
|
|
557
|
+
bid: [{
|
|
558
|
+
id: 'a_403370_332fdb9b064040ddbec05891bd13ab28',
|
|
559
|
+
crid: 'creativelycreatedcreativecreative',
|
|
560
|
+
impid: '263c448586f5a1',
|
|
561
|
+
price: 0.45882675,
|
|
562
|
+
nurl: '',
|
|
563
|
+
adm: bidAdm,
|
|
564
|
+
h: 480,
|
|
565
|
+
w: 640
|
|
570
566
|
}]
|
|
571
567
|
}]
|
|
572
568
|
}
|
|
573
|
-
}
|
|
574
|
-
})
|
|
569
|
+
}
|
|
570
|
+
})
|
|
575
571
|
|
|
576
572
|
it('should get the correct bid response', function () {
|
|
577
573
|
const expectedResponse = {
|
|
578
574
|
...baseVideoResponse,
|
|
579
|
-
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
const result = spec.interpretResponse(videoResponse);
|
|
575
|
+
ttl: 60000,
|
|
576
|
+
}
|
|
577
|
+
const result = spec.interpretResponse(videoResponse)
|
|
583
578
|
|
|
584
579
|
expect(result[0]).to.have.deep.keys(expectedResponse)
|
|
585
|
-
})
|
|
580
|
+
})
|
|
586
581
|
|
|
587
582
|
it('crid should default to the bid id if not on the response', function () {
|
|
588
|
-
delete videoResponse.body.seatbid[0].bid[0].crid
|
|
583
|
+
delete videoResponse.body.seatbid[0].bid[0].crid
|
|
589
584
|
|
|
590
585
|
const expectedResponse = {
|
|
591
586
|
...baseVideoResponse,
|
|
592
|
-
|
|
587
|
+
creativeId: videoResponse.body.seatbid[0].bid[0].id,
|
|
593
588
|
}
|
|
589
|
+
const result = spec.interpretResponse(videoResponse)
|
|
594
590
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
expect(result[0]).to.deep.equal(expectedResponse);
|
|
598
|
-
});
|
|
591
|
+
expect(result[0]).to.deep.equal(expectedResponse)
|
|
592
|
+
})
|
|
599
593
|
|
|
600
594
|
it('should get correct bid response when dealId is passed', function () {
|
|
601
|
-
videoResponse.body.seatbid[0].bid[0].dealid = 'baking'
|
|
595
|
+
videoResponse.body.seatbid[0].bid[0].dealid = 'baking'
|
|
602
596
|
const expectedResponse = {
|
|
603
597
|
...baseVideoResponse,
|
|
604
|
-
|
|
598
|
+
dealId: 'baking',
|
|
605
599
|
}
|
|
606
|
-
|
|
607
600
|
const result = spec.interpretResponse(videoResponse)
|
|
608
601
|
|
|
609
|
-
expect(result[0]).to.deep.equal(expectedResponse)
|
|
610
|
-
})
|
|
602
|
+
expect(result[0]).to.deep.equal(expectedResponse)
|
|
603
|
+
})
|
|
611
604
|
|
|
612
605
|
it('should get correct bid response when ttl is set', function () {
|
|
613
606
|
videoResponse.body.seatbid[0].bid[0].ext = { 'ttl': 480 }
|
|
614
607
|
|
|
615
608
|
const expectedResponse = {
|
|
616
609
|
...baseVideoResponse,
|
|
617
|
-
|
|
610
|
+
ttl: 480,
|
|
618
611
|
}
|
|
619
|
-
|
|
620
612
|
const result = spec.interpretResponse(videoResponse)
|
|
621
613
|
|
|
622
614
|
expect(result[0]).to.deep.equal(expectedResponse)
|
|
@@ -625,52 +617,51 @@ describe('sovrnBidAdapter', function() {
|
|
|
625
617
|
it('handles empty bid response', function () {
|
|
626
618
|
const response = {
|
|
627
619
|
body: {
|
|
628
|
-
|
|
629
|
-
|
|
620
|
+
id: '37386aade21a71',
|
|
621
|
+
seatbid: []
|
|
630
622
|
}
|
|
631
|
-
}
|
|
632
|
-
|
|
623
|
+
}
|
|
633
624
|
const result = spec.interpretResponse(response)
|
|
634
625
|
|
|
635
|
-
expect(result.length).to.equal(0)
|
|
636
|
-
})
|
|
637
|
-
})
|
|
626
|
+
expect(result.length).to.equal(0)
|
|
627
|
+
})
|
|
628
|
+
})
|
|
638
629
|
|
|
639
630
|
describe('getUserSyncs ', function() {
|
|
640
|
-
const syncOptions = { iframeEnabled: true, pixelEnabled: false }
|
|
641
|
-
const iframeDisabledSyncOptions = { iframeEnabled: false, pixelEnabled: false }
|
|
631
|
+
const syncOptions = { iframeEnabled: true, pixelEnabled: false }
|
|
632
|
+
const iframeDisabledSyncOptions = { iframeEnabled: false, pixelEnabled: false }
|
|
642
633
|
const serverResponse = [
|
|
643
634
|
{
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
635
|
+
body: {
|
|
636
|
+
id: '546956d68c757f',
|
|
637
|
+
seatbid: [
|
|
647
638
|
{
|
|
648
|
-
|
|
639
|
+
bid: [
|
|
649
640
|
{
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
641
|
+
id: 'a_448326_16c2ada014224bee815a90d2248322f5',
|
|
642
|
+
impid: '2a3826aae345f4',
|
|
643
|
+
price: 1.0099999904632568,
|
|
644
|
+
nurl: 'http://localhost/rtb/impression?bannerid=220958&campaignid=3890&rtb_tid=15588614-75d2-40ab-b27e-13d2127b3c2e&rpid=1295&seatid=seat1&zoneid=448326&cb=26900712&tid=a_448326_16c2ada014224bee815a90d2248322f5',
|
|
645
|
+
adm: 'yo a creative',
|
|
646
|
+
crid: 'cridprebidrtb',
|
|
647
|
+
w: 160,
|
|
648
|
+
h: 600
|
|
658
649
|
},
|
|
659
650
|
{
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
651
|
+
id: 'a_430392_beac4c1515da4576acf6cb9c5340b40c',
|
|
652
|
+
impid: '3cf96fd26ed4c5',
|
|
653
|
+
price: 1.0099999904632568,
|
|
654
|
+
nurl: 'http://localhost/rtb/impression?bannerid=220957&campaignid=3890&rtb_tid=5bc0e68b-3492-448d-a6f9-26fa3fd0b646&rpid=1295&seatid=seat1&zoneid=430392&cb=62735099&tid=a_430392_beac4c1515da4576acf6cb9c5340b40c',
|
|
655
|
+
adm: 'yo a creative',
|
|
656
|
+
crid: 'cridprebidrtb',
|
|
657
|
+
w: 300,
|
|
658
|
+
h: 250
|
|
668
659
|
},
|
|
669
660
|
]
|
|
670
661
|
}
|
|
671
662
|
],
|
|
672
|
-
|
|
673
|
-
|
|
663
|
+
ext: {
|
|
664
|
+
iid: 13487408,
|
|
674
665
|
sync: {
|
|
675
666
|
pixels: [
|
|
676
667
|
{
|
|
@@ -683,20 +674,19 @@ describe('sovrnBidAdapter', function() {
|
|
|
683
674
|
}
|
|
684
675
|
}
|
|
685
676
|
},
|
|
686
|
-
|
|
677
|
+
headers: {}
|
|
687
678
|
}
|
|
688
|
-
]
|
|
679
|
+
]
|
|
689
680
|
|
|
690
681
|
it('should return if iid present on server response & iframe syncs enabled', function() {
|
|
691
682
|
const expectedReturnStatement = {
|
|
692
|
-
|
|
693
|
-
|
|
683
|
+
type: 'iframe',
|
|
684
|
+
url: 'https://ap.lijit.com/beacon?informer=13487408',
|
|
694
685
|
}
|
|
686
|
+
const returnStatement = spec.getUserSyncs(syncOptions, serverResponse)
|
|
695
687
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
expect(returnStatement[0]).to.deep.equal(expectedReturnStatement);
|
|
699
|
-
});
|
|
688
|
+
expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
|
|
689
|
+
})
|
|
700
690
|
|
|
701
691
|
it('should include gdpr consent string if present', function() {
|
|
702
692
|
const gdprConsent = {
|
|
@@ -704,64 +694,63 @@ describe('sovrnBidAdapter', function() {
|
|
|
704
694
|
consentString: 'BOJ8RZsOJ8RZsABAB8AAAAAZ+A=='
|
|
705
695
|
}
|
|
706
696
|
const expectedReturnStatement = {
|
|
707
|
-
|
|
708
|
-
|
|
697
|
+
type: 'iframe',
|
|
698
|
+
url: `https://ap.lijit.com/beacon?gdpr_consent=${gdprConsent.consentString}&informer=13487408`,
|
|
709
699
|
}
|
|
710
700
|
|
|
711
|
-
const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, gdprConsent, '')
|
|
701
|
+
const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, gdprConsent, '')
|
|
712
702
|
|
|
713
|
-
expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
|
|
714
|
-
})
|
|
703
|
+
expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
|
|
704
|
+
})
|
|
715
705
|
|
|
716
706
|
it('should include us privacy string if present', function() {
|
|
717
|
-
const uspString = '1NYN'
|
|
707
|
+
const uspString = '1NYN'
|
|
718
708
|
const expectedReturnStatement = {
|
|
719
|
-
|
|
720
|
-
|
|
709
|
+
type: 'iframe',
|
|
710
|
+
url: `https://ap.lijit.com/beacon?us_privacy=${uspString}&informer=13487408`,
|
|
721
711
|
}
|
|
722
712
|
|
|
723
|
-
const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, null, uspString)
|
|
713
|
+
const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, null, uspString)
|
|
724
714
|
|
|
725
|
-
expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
|
|
726
|
-
})
|
|
715
|
+
expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
|
|
716
|
+
})
|
|
727
717
|
|
|
728
718
|
it('should include all privacy strings if present', function() {
|
|
729
719
|
const gdprConsent = {
|
|
730
720
|
gdprApplies: 1,
|
|
731
721
|
consentString: 'BOJ8RZsOJ8RZsABAB8AAAAAZ+A=='
|
|
732
722
|
}
|
|
733
|
-
const uspString = '1NYN'
|
|
723
|
+
const uspString = '1NYN'
|
|
734
724
|
const expectedReturnStatement = {
|
|
735
|
-
|
|
736
|
-
|
|
725
|
+
type: 'iframe',
|
|
726
|
+
url: `https://ap.lijit.com/beacon?gdpr_consent=${gdprConsent.consentString}&us_privacy=${uspString}&informer=13487408`,
|
|
737
727
|
}
|
|
738
728
|
|
|
739
729
|
const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, gdprConsent, uspString)
|
|
740
730
|
|
|
741
731
|
expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
|
|
742
|
-
})
|
|
732
|
+
})
|
|
743
733
|
|
|
744
734
|
it('should not return if iid missing on server response', function() {
|
|
745
|
-
const returnStatement = spec.getUserSyncs(syncOptions, [])
|
|
735
|
+
const returnStatement = spec.getUserSyncs(syncOptions, [])
|
|
746
736
|
|
|
747
|
-
expect(returnStatement).to.be.empty
|
|
748
|
-
})
|
|
737
|
+
expect(returnStatement).to.be.empty
|
|
738
|
+
})
|
|
749
739
|
|
|
750
740
|
it('should not return if iframe syncs disabled', function() {
|
|
751
|
-
const returnStatement = spec.getUserSyncs(iframeDisabledSyncOptions, serverResponse)
|
|
741
|
+
const returnStatement = spec.getUserSyncs(iframeDisabledSyncOptions, serverResponse)
|
|
752
742
|
|
|
753
|
-
expect(returnStatement).to.be.empty
|
|
754
|
-
})
|
|
743
|
+
expect(returnStatement).to.be.empty
|
|
744
|
+
})
|
|
755
745
|
|
|
756
746
|
it('should include pixel syncs', function() {
|
|
757
747
|
const pixelEnabledOptions = { iframeEnabled: false, pixelEnabled: true }
|
|
758
|
-
|
|
759
748
|
const otherResponce = {
|
|
760
749
|
...serverResponse,
|
|
761
|
-
|
|
750
|
+
body: {
|
|
762
751
|
...serverResponse.body,
|
|
763
|
-
|
|
764
|
-
|
|
752
|
+
ext: {
|
|
753
|
+
iid: 13487408,
|
|
765
754
|
sync: {
|
|
766
755
|
pixels: [
|
|
767
756
|
{
|
|
@@ -778,33 +767,33 @@ describe('sovrnBidAdapter', function() {
|
|
|
778
767
|
|
|
779
768
|
const returnStatement = spec.getUserSyncs(pixelEnabledOptions, [...serverResponse, otherResponce])
|
|
780
769
|
|
|
781
|
-
expect(returnStatement.length).to.equal(4)
|
|
770
|
+
expect(returnStatement.length).to.equal(4)
|
|
782
771
|
expect(returnStatement).to.deep.include.members([
|
|
783
772
|
{ type: 'image', url: 'http://idprovider1.com' },
|
|
784
773
|
{ type: 'image', url: 'http://idprovider2.com' },
|
|
785
774
|
{ type: 'image', url: 'http://idprovider3.com' },
|
|
786
775
|
{ type: 'image', url: 'http://idprovider4.com' }
|
|
787
|
-
])
|
|
776
|
+
])
|
|
788
777
|
})
|
|
789
778
|
})
|
|
790
779
|
|
|
791
780
|
describe('prebid 3 upgrade', function() {
|
|
792
781
|
const bidRequest = {
|
|
793
782
|
...baseBidRequest,
|
|
794
|
-
|
|
795
|
-
|
|
783
|
+
params: {
|
|
784
|
+
tagid: '403370'
|
|
796
785
|
},
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
786
|
+
mediaTypes: {
|
|
787
|
+
banner: {
|
|
788
|
+
sizes: [
|
|
800
789
|
[300, 250],
|
|
801
790
|
[300, 600]
|
|
802
791
|
]
|
|
803
792
|
}
|
|
804
793
|
},
|
|
805
|
-
}
|
|
806
|
-
const request = spec.buildRequests([bidRequest], baseBidderRequest)
|
|
807
|
-
const payload = JSON.parse(request.data)
|
|
794
|
+
}
|
|
795
|
+
const request = spec.buildRequests([bidRequest], baseBidderRequest)
|
|
796
|
+
const payload = JSON.parse(request.data)
|
|
808
797
|
|
|
809
798
|
it('gets sizes from mediaTypes.banner', function() {
|
|
810
799
|
expect(payload.imp[0].banner.format).to.deep.equal([{w: 300, h: 250}, {w: 300, h: 600}])
|
|
@@ -813,8 +802,8 @@ describe('sovrnBidAdapter', function() {
|
|
|
813
802
|
})
|
|
814
803
|
|
|
815
804
|
it('gets correct site info', function() {
|
|
816
|
-
expect(payload.site.page).to.equal('http://example.com/page.html')
|
|
817
|
-
expect(payload.site.domain).to.equal('example.com')
|
|
805
|
+
expect(payload.site.page).to.equal('http://example.com/page.html')
|
|
806
|
+
expect(payload.site.domain).to.equal('example.com')
|
|
818
807
|
})
|
|
819
808
|
})
|
|
820
809
|
})
|