prebid.js 7.3.0 → 7.6.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 +11 -6
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adotBidAdapter.js +1 -1
- package/dist/adpod.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adrinoBidAdapter.js +1 -1
- package/dist/adtelligentBidAdapter.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/asoBidAdapter.js +1 -1
- package/dist/atsAnalyticsAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/byDataAnalyticsAdapter.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/debugging-standalone.js +1 -1
- package/dist/debugging.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/gdprEnforcement.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/hadronIdSystem.js +1 -1
- package/dist/hadronRtdProvider.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imRtdProvider.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/kargoAnalyticsAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.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/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/missenaBidAdapter.js +1 -1
- package/dist/newspassidBidAdapter.js +1 -0
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +131 -127
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -0
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- package/dist/priceFloors.js +1 -1
- package/dist/pubCommonId.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/rasBidAdapter.js +1 -0
- 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/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -0
- package/dist/sizeMappingV2.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/taboolaBidAdapter.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/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/ventesBidAdapter.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vrtcalBidAdapter.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/gulpfile.js +1 -1
- package/karma.conf.maker.js +3 -1
- package/modules/adgenerationBidAdapter.js +24 -1
- package/modules/adnuntiusBidAdapter.js +26 -8
- package/modules/adotBidAdapter.js +13 -4
- package/modules/adrinoBidAdapter.js +10 -2
- package/modules/adrinoBidAdapter.md +6 -0
- package/modules/adtelligentBidAdapter.js +2 -1
- package/modules/appnexusBidAdapter.js +3 -3
- package/modules/atsAnalyticsAdapter.js +4 -5
- package/modules/byDataAnalyticsAdapter.js +172 -74
- package/modules/byDataAnalyticsAdapter.md +5 -6
- package/modules/consumableBidAdapter.js +12 -1
- package/modules/criteoBidAdapter.js +7 -1
- package/modules/cwireBidAdapter.md +1 -1
- package/modules/debugging/bidInterceptor.js +1 -1
- package/modules/debugging/index.js +2 -1
- package/modules/eplanningBidAdapter.js +82 -97
- package/modules/gdprEnforcement.js +8 -14
- package/modules/gridNMBidAdapter.js +45 -4
- package/modules/hadronAnalyticsAdapter.md +5 -5
- package/modules/hadronIdSystem.js +18 -5
- package/modules/hadronIdSystem.md +15 -11
- package/modules/hadronRtdProvider.js +14 -1
- package/modules/hadronRtdProvider.md +17 -13
- package/modules/imRtdProvider.js +0 -8
- package/modules/insticatorBidAdapter.js +9 -0
- package/modules/ixBidAdapter.js +462 -58
- package/modules/ixBidAdapter.md +95 -5
- package/modules/kargoAnalyticsAdapter.js +88 -6
- package/modules/kargoAnalyticsAdapter.md +33 -0
- package/modules/kargoBidAdapter.js +1 -2
- package/modules/minutemediaBidAdapter.js +1 -0
- package/modules/missenaBidAdapter.js +20 -2
- package/modules/newspassidBidAdapter.js +649 -0
- package/modules/nextMillenniumBidAdapter.js +17 -1
- package/modules/oguryBidAdapter.js +2 -0
- package/modules/openxBidAdapter.md +3 -1
- package/modules/openxOrtbBidAdapter.js +349 -0
- package/modules/openxOrtbBidAdapter.md +105 -0
- package/modules/priceFloors.js +1 -1
- package/modules/pubCommonId.js +1 -2
- package/modules/pubxaiAnalyticsAdapter.js +6 -1
- package/modules/rasBidAdapter.js +149 -0
- package/modules/rasBidAdapter.md +50 -0
- package/modules/readpeakBidAdapter.js +15 -6
- package/modules/relaidoBidAdapter.js +19 -4
- package/modules/seedtagBidAdapter.js +37 -1
- package/modules/sharedIdSystem.js +11 -5
- package/modules/sharethroughBidAdapter.js +9 -24
- package/modules/shinezBidAdapter.js +435 -0
- package/modules/shinezBidAdapter.md +76 -0
- package/modules/taboolaBidAdapter.js +1 -1
- package/modules/taboolaBidAdapter.md +3 -3
- package/modules/ventesBidAdapter.js +1 -1
- package/modules/ventesBidAdapter.md +1 -1
- package/modules/vrtcalBidAdapter.js +35 -0
- package/package.json +1 -1
- package/plugins/pbjsGlobals.js +2 -1
- package/src/storageManager.js +4 -5
- package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -4
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +126 -14
- package/test/spec/modules/adotBidAdapter_spec.js +12 -9
- package/test/spec/modules/adrinoBidAdapter_spec.js +22 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
- package/test/spec/modules/byDataAnalyticsAdapter_spec.js +74 -24
- package/test/spec/modules/consumableBidAdapter_spec.js +75 -0
- package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
- package/test/spec/modules/debugging_mod_spec.js +7 -0
- package/test/spec/modules/eplanningBidAdapter_spec.js +58 -18
- package/test/spec/modules/gdprEnforcement_spec.js +53 -100
- package/test/spec/modules/gridNMBidAdapter_spec.js +32 -0
- package/test/spec/modules/hadronIdSystem_spec.js +2 -2
- package/test/spec/modules/imRtdProvider_spec.js +0 -1
- package/test/spec/modules/insticatorBidAdapter_spec.js +22 -1
- package/test/spec/modules/ixBidAdapter_spec.js +470 -10
- package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
- package/test/spec/modules/kargoBidAdapter_spec.js +1 -0
- package/test/spec/modules/minutemediaBidAdapter_spec.js +3 -0
- package/test/spec/modules/missenaBidAdapter_spec.js +36 -14
- package/test/spec/modules/newspassidBidAdapter_spec.js +1793 -0
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +20 -0
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +1303 -0
- package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +5 -0
- package/test/spec/modules/rasBidAdapter_spec.js +190 -0
- package/test/spec/modules/readpeakBidAdapter_spec.js +1 -0
- package/test/spec/modules/relaidoBidAdapter_spec.js +29 -2
- package/test/spec/modules/seedtagBidAdapter_spec.js +29 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
- package/test/spec/modules/shinezBidAdapter_spec.js +479 -0
- package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
- package/test/spec/modules/ventesBidAdapter_spec.js +2 -2
- package/test/spec/modules/vrtcalBidAdapter_spec.js +17 -0
- package/webpack.conf.js +1 -1
|
@@ -624,6 +624,11 @@ describe('pubxai analytics adapter', function() {
|
|
|
624
624
|
}
|
|
625
625
|
},
|
|
626
626
|
'floorProvider': 'PubXFloorProvider',
|
|
627
|
+
'floorFetchStatus': 'success',
|
|
628
|
+
'floorLocation': 'fetch',
|
|
629
|
+
'floorModelVersion': 'test model 1.0',
|
|
630
|
+
'floorSkipRate': 0,
|
|
631
|
+
'isFloorSkipped': false,
|
|
627
632
|
'isWinningBid': true,
|
|
628
633
|
'mediaType': 'banner',
|
|
629
634
|
'netRevenue': true,
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { expect } from 'chai';
|
|
2
|
+
import { spec } from 'modules/rasBidAdapter.js';
|
|
3
|
+
import { newBidder } from 'src/adapters/bidderFactory.js';
|
|
4
|
+
|
|
5
|
+
const CSR_ENDPOINT = 'https://csr.onet.pl/4178463/csr-006/csr.json?';
|
|
6
|
+
|
|
7
|
+
describe('rasBidAdapter', function () {
|
|
8
|
+
const adapter = newBidder(spec);
|
|
9
|
+
|
|
10
|
+
describe('inherited functions', function () {
|
|
11
|
+
it('exists and is a function', function () {
|
|
12
|
+
expect(adapter.callBids).to.exist.and.to.be.a('function');
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
describe('isBidRequestValid', function () {
|
|
17
|
+
it('should return true when required params found', function () {
|
|
18
|
+
const bid = {
|
|
19
|
+
sizes: [[300, 250], [300, 600]],
|
|
20
|
+
bidder: 'ras',
|
|
21
|
+
params: {
|
|
22
|
+
slot: 'slot',
|
|
23
|
+
area: 'areatest',
|
|
24
|
+
site: 'test',
|
|
25
|
+
network: '4178463'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
expect(spec.isBidRequestValid(bid)).to.equal(true);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should return false when required params not found', function () {
|
|
32
|
+
const failBid = {
|
|
33
|
+
sizes: [[300, 250], [300, 300]],
|
|
34
|
+
bidder: 'ras',
|
|
35
|
+
params: {
|
|
36
|
+
site: 'test',
|
|
37
|
+
network: '4178463'
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
expect(spec.isBidRequestValid(failBid)).to.equal(false);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('should return nothing when bid request is malformed', function () {
|
|
44
|
+
const failBid = {
|
|
45
|
+
sizes: [[300, 250], [300, 300]],
|
|
46
|
+
bidder: 'ras',
|
|
47
|
+
};
|
|
48
|
+
expect(spec.isBidRequestValid(failBid)).to.equal(undefined);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
describe('buildRequests', function () {
|
|
53
|
+
const bid = {
|
|
54
|
+
sizes: [[300, 250], [300, 600]],
|
|
55
|
+
bidder: 'ras',
|
|
56
|
+
bidId: 1,
|
|
57
|
+
params: {
|
|
58
|
+
slot: 'test',
|
|
59
|
+
area: 'areatest',
|
|
60
|
+
site: 'test',
|
|
61
|
+
network: '4178463'
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const bid2 = {
|
|
65
|
+
sizes: [[750, 300]],
|
|
66
|
+
bidder: 'ras',
|
|
67
|
+
bidId: 2,
|
|
68
|
+
params: {
|
|
69
|
+
slot: 'test2',
|
|
70
|
+
area: 'areatest',
|
|
71
|
+
site: 'test',
|
|
72
|
+
network: '4178463'
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
it('should parse bids to request', function () {
|
|
77
|
+
const requests = spec.buildRequests([bid], {
|
|
78
|
+
'gdprConsent': {
|
|
79
|
+
'gdprApplies': true,
|
|
80
|
+
'consentString': 'some-consent-string'
|
|
81
|
+
},
|
|
82
|
+
'refererInfo': {
|
|
83
|
+
'ref': 'https://example.org/',
|
|
84
|
+
'page': 'https://example.com/'
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
expect(requests[0].url).to.have.string(CSR_ENDPOINT);
|
|
88
|
+
expect(requests[0].url).to.have.string('slot0=test');
|
|
89
|
+
expect(requests[0].url).to.have.string('id0=1');
|
|
90
|
+
expect(requests[0].url).to.have.string('site=test');
|
|
91
|
+
expect(requests[0].url).to.have.string('area=areatest');
|
|
92
|
+
expect(requests[0].url).to.have.string('cre_format=html');
|
|
93
|
+
expect(requests[0].url).to.have.string('systems=das');
|
|
94
|
+
expect(requests[0].url).to.have.string('ems_url=1');
|
|
95
|
+
expect(requests[0].url).to.have.string('bid_rate=1');
|
|
96
|
+
expect(requests[0].url).to.have.string('gdpr_applies=true');
|
|
97
|
+
expect(requests[0].url).to.have.string('euconsent=some-consent-string');
|
|
98
|
+
expect(requests[0].url).to.have.string('du=https%3A%2F%2Fexample.com%2F');
|
|
99
|
+
expect(requests[0].url).to.have.string('dr=https%3A%2F%2Fexample.org%2F');
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it('should return empty consent string when undefined', function () {
|
|
103
|
+
const requests = spec.buildRequests([bid]);
|
|
104
|
+
const gdpr = requests[0].url.search('gdpr_applies');
|
|
105
|
+
const euconsent = requests[0].url.search('euconsent=');
|
|
106
|
+
expect(gdpr).to.equal(-1);
|
|
107
|
+
expect(euconsent).to.equal(-1);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('should parse bids to request from pageContext', function () {
|
|
111
|
+
const bidCopy = { ...bid };
|
|
112
|
+
bidCopy.params = {
|
|
113
|
+
...bid.params,
|
|
114
|
+
pageContext: {
|
|
115
|
+
dv: 'test/areatest',
|
|
116
|
+
du: 'https://example.com/',
|
|
117
|
+
dr: 'https://example.org/',
|
|
118
|
+
keyWords: ['val1', 'val2'],
|
|
119
|
+
keyValues: {
|
|
120
|
+
adunit: 'test/areatest'
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const requests = spec.buildRequests([bidCopy, bid2]);
|
|
125
|
+
expect(requests[0].url).to.have.string(CSR_ENDPOINT);
|
|
126
|
+
expect(requests[0].url).to.have.string('slot0=test');
|
|
127
|
+
expect(requests[0].url).to.have.string('id0=1');
|
|
128
|
+
expect(requests[0].url).to.have.string('iusizes0=300x250%2C300x600');
|
|
129
|
+
expect(requests[0].url).to.have.string('slot1=test2');
|
|
130
|
+
expect(requests[0].url).to.have.string('id1=2');
|
|
131
|
+
expect(requests[0].url).to.have.string('iusizes1=750x300');
|
|
132
|
+
expect(requests[0].url).to.have.string('site=test');
|
|
133
|
+
expect(requests[0].url).to.have.string('area=areatest');
|
|
134
|
+
expect(requests[0].url).to.have.string('cre_format=html');
|
|
135
|
+
expect(requests[0].url).to.have.string('systems=das');
|
|
136
|
+
expect(requests[0].url).to.have.string('ems_url=1');
|
|
137
|
+
expect(requests[0].url).to.have.string('bid_rate=1');
|
|
138
|
+
expect(requests[0].url).to.have.string('du=https%3A%2F%2Fexample.com%2F');
|
|
139
|
+
expect(requests[0].url).to.have.string('dr=https%3A%2F%2Fexample.org%2F');
|
|
140
|
+
expect(requests[0].url).to.have.string('DV=test%2Fareatest');
|
|
141
|
+
expect(requests[0].url).to.have.string('kwrd=val1%2Bval2');
|
|
142
|
+
expect(requests[0].url).to.have.string('kvadunit=test%2Fareatest');
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
describe('interpretResponse', function () {
|
|
147
|
+
const response = {
|
|
148
|
+
'adsCheck': 'ok',
|
|
149
|
+
'geoloc': {},
|
|
150
|
+
'ir': '92effd60-0c84-4dac-817e-763ea7b8ac65',
|
|
151
|
+
'ads': [
|
|
152
|
+
{
|
|
153
|
+
'id': 'flat-belkagorna',
|
|
154
|
+
'slot': 'flat-belkagorna',
|
|
155
|
+
'prio': 10,
|
|
156
|
+
'type': 'html',
|
|
157
|
+
'bid_rate': 0.321123,
|
|
158
|
+
'adid': 'das,50463,152276',
|
|
159
|
+
'id_3': '12734',
|
|
160
|
+
'html': '<script type=\"text/javascript\">test</script>'
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
'iv': '202003191334467636346500'
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
it('should get correct bid response', function () {
|
|
167
|
+
const resp = spec.interpretResponse({ body: response }, { bidIds: [{ slot: 'flat-belkagorna', bidId: 1 }] });
|
|
168
|
+
expect(resp[0]).to.have.all.keys('cpm', 'currency', 'netRevenue', 'requestId', 'ttl', 'width', 'height', 'creativeId', 'dealId', 'ad', 'meta');
|
|
169
|
+
expect(resp.length).to.equal(1);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it('should handle empty ad', function () {
|
|
173
|
+
let res = {
|
|
174
|
+
'ads': [{
|
|
175
|
+
type: 'empty'
|
|
176
|
+
}]
|
|
177
|
+
};
|
|
178
|
+
const resp = spec.interpretResponse({ body: res }, {});
|
|
179
|
+
expect(resp).to.deep.equal([]);
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
it('should handle empty server response', function () {
|
|
183
|
+
let res = {
|
|
184
|
+
'ads': []
|
|
185
|
+
};
|
|
186
|
+
const resp = spec.interpretResponse({ body: res }, {});
|
|
187
|
+
expect(resp).to.deep.equal([]);
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
});
|
|
@@ -528,6 +528,7 @@ describe('ReadPeakAdapter', function() {
|
|
|
528
528
|
ad: bannerServerResponse.seatbid[0].bid[0].adm,
|
|
529
529
|
width: bannerServerResponse.seatbid[0].bid[0].w,
|
|
530
530
|
height: bannerServerResponse.seatbid[0].bid[0].h,
|
|
531
|
+
burl: bannerServerResponse.seatbid[0].bid[0].burl,
|
|
531
532
|
});
|
|
532
533
|
expect(bidResponse.meta).to.deep.equal({
|
|
533
534
|
advertiserDomains: ['readpeak.com'],
|
|
@@ -81,8 +81,8 @@ describe('RelaidoAdapter', function () {
|
|
|
81
81
|
data: {
|
|
82
82
|
bids: [{
|
|
83
83
|
bidId: bidRequest.bidId,
|
|
84
|
-
width: bidRequest.mediaTypes.video.playerSize[0][0],
|
|
85
|
-
height: bidRequest.mediaTypes.video.playerSize[0][1],
|
|
84
|
+
width: bidRequest.mediaTypes.video.playerSize[0][0] || bidRequest.mediaTypes.video.playerSize[0],
|
|
85
|
+
height: bidRequest.mediaTypes.video.playerSize[0][1] || bidRequest.mediaTypes.video.playerSize[1],
|
|
86
86
|
mediaType: 'video'}]
|
|
87
87
|
}
|
|
88
88
|
};
|
|
@@ -98,6 +98,33 @@ describe('RelaidoAdapter', function () {
|
|
|
98
98
|
expect(spec.isBidRequestValid(bidRequest)).to.equal(true);
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
+
it('should return true when not existed mediaTypes.video.playerSize and existed valid params.video.playerSize by video', function () {
|
|
102
|
+
bidRequest.mediaTypes = {
|
|
103
|
+
video: {
|
|
104
|
+
context: 'outstream'
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
bidRequest.params = {
|
|
108
|
+
placementId: '100000',
|
|
109
|
+
video: {
|
|
110
|
+
playerSize: [
|
|
111
|
+
[640, 360]
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
expect(spec.isBidRequestValid(bidRequest)).to.equal(true);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it('should return even true when the playerSize is Array[Number, Number] by video', function () {
|
|
119
|
+
bidRequest.mediaTypes = {
|
|
120
|
+
video: {
|
|
121
|
+
context: 'outstream',
|
|
122
|
+
playerSize: [640, 360]
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
expect(spec.isBidRequestValid(bidRequest)).to.equal(true);
|
|
126
|
+
});
|
|
127
|
+
|
|
101
128
|
it('should return true when the required params are passed by banner', function () {
|
|
102
129
|
setUAMobile();
|
|
103
130
|
bidRequest.mediaTypes = {
|
|
@@ -223,6 +223,7 @@ describe('Seedtag Adapter', function () {
|
|
|
223
223
|
});
|
|
224
224
|
|
|
225
225
|
it('Common data request should be correct', function () {
|
|
226
|
+
const now = Date.now();
|
|
226
227
|
const request = spec.buildRequests(validBidRequests, bidderRequest);
|
|
227
228
|
const data = JSON.parse(request.data);
|
|
228
229
|
expect(data.url).to.equal('referer');
|
|
@@ -231,6 +232,9 @@ describe('Seedtag Adapter', function () {
|
|
|
231
232
|
expect(
|
|
232
233
|
['fixed', 'mobile', 'unknown'].indexOf(data.connectionType)
|
|
233
234
|
).to.be.above(-1);
|
|
235
|
+
expect(data.auctionStart).to.be.greaterThanOrEqual(now);
|
|
236
|
+
expect(data.ttfb).to.be.greaterThanOrEqual(0);
|
|
237
|
+
|
|
234
238
|
expect(data.bidRequests[0].adUnitCode).to.equal('adunit-code');
|
|
235
239
|
});
|
|
236
240
|
|
|
@@ -288,6 +292,31 @@ describe('Seedtag Adapter', function () {
|
|
|
288
292
|
it('should expose gvlid', function () {
|
|
289
293
|
expect(spec.gvlid).to.equal(157);
|
|
290
294
|
});
|
|
295
|
+
it('should handle uspConsent', function () {
|
|
296
|
+
const uspConsent = '1---';
|
|
297
|
+
|
|
298
|
+
bidderRequest['uspConsent'] = uspConsent;
|
|
299
|
+
|
|
300
|
+
const request = spec.buildRequests(validBidRequests, bidderRequest);
|
|
301
|
+
const payload = JSON.parse(request.data);
|
|
302
|
+
|
|
303
|
+
expect(payload.uspConsent).to.exist;
|
|
304
|
+
expect(payload.uspConsent).to.equal(uspConsent);
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
it("shouldn't send uspConsent when not available", function () {
|
|
308
|
+
const uspConsent = undefined;
|
|
309
|
+
|
|
310
|
+
bidderRequest['uspConsent'] = uspConsent;
|
|
311
|
+
|
|
312
|
+
const request = spec.buildRequests(
|
|
313
|
+
validBidRequests,
|
|
314
|
+
bidderRequest
|
|
315
|
+
);
|
|
316
|
+
const payload = JSON.parse(request.data);
|
|
317
|
+
|
|
318
|
+
expect(payload.uspConsent).to.not.exist;
|
|
319
|
+
});
|
|
291
320
|
});
|
|
292
321
|
});
|
|
293
322
|
|
|
@@ -601,11 +601,11 @@ describe('sharethrough adapter spec', function () {
|
|
|
601
601
|
const serverResponses = [{ body: { cookieSyncUrls: cookieSyncs } }];
|
|
602
602
|
|
|
603
603
|
it('returns an array of correctly formatted user syncs', function () {
|
|
604
|
-
const syncArray = spec.getUserSyncs({ pixelEnabled: true }, serverResponses
|
|
604
|
+
const syncArray = spec.getUserSyncs({ pixelEnabled: true }, serverResponses);
|
|
605
605
|
expect(syncArray).to.deep.equal([
|
|
606
|
-
{ type: 'image', url: 'cookieUrl1
|
|
607
|
-
{ type: 'image', url: 'cookieUrl2
|
|
608
|
-
{ type: 'image', url: 'cookieUrl3
|
|
606
|
+
{ type: 'image', url: 'cookieUrl1' },
|
|
607
|
+
{ type: 'image', url: 'cookieUrl2' },
|
|
608
|
+
{ type: 'image', url: 'cookieUrl3' }],
|
|
609
609
|
);
|
|
610
610
|
});
|
|
611
611
|
|