prebid.js 7.44.0 → 7.45.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/33acrossIdSystem.js +1 -1
- package/dist/acuityAdsBidAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/appushBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/beyondmediaBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/braveBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/brightcomBidAdapter.js +1 -1
- package/dist/brightcomSSPBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/coinzillaBidAdapter.js +1 -1
- package/dist/compassBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/contentexchangeBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dependencies.json +12 -0
- package/dist/domainOverrideToRootDomain.js +1 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/globalsunBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/growthCodeIdSystem.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.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/iqzoneBidAdapter.js +1 -1
- package/dist/ivsBidAdapter.js +1 -0
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/jwplayerVideoProvider.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/koblerBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/kulturemediaBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/luponmediaBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mathildeadsBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +158 -156
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/onomagicBidAdapter.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/optidigitalBidAdapter.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/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.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/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 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smarthubBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/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/truereachBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/videoheroesBidAdapter.js +1 -1
- package/dist/vidoomyBidAdapter.js +1 -1
- package/dist/visiblemeasuresBidAdapter.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/dist/yieldoneBidAdapter.js +1 -1
- package/libraries/domainOverrideToRootDomain/index.js +39 -0
- package/modules/acuityAdsBidAdapter.js +1 -1
- package/modules/amxBidAdapter.js +1 -1
- package/modules/amxIdSystem.js +23 -20
- package/modules/amxIdSystem.md +7 -7
- package/modules/appushBidAdapter.js +1 -1
- package/modules/beyondmediaBidAdapter.js +1 -1
- package/modules/braveBidAdapter.js +1 -1
- package/modules/brightcomBidAdapter.js +1 -1
- package/modules/brightcomSSPBidAdapter.js +1 -1
- package/modules/coinzillaBidAdapter.js +1 -2
- package/modules/compassBidAdapter.js +1 -1
- package/modules/connectIdSystem.js +96 -21
- package/modules/connectIdSystem.md +6 -5
- package/modules/contentexchangeBidAdapter.js +1 -1
- package/modules/freewheel-sspBidAdapter.js +8 -0
- package/modules/glimpseBidAdapter.js +1 -2
- package/modules/globalsunBidAdapter.js +1 -1
- package/modules/gridBidAdapter.js +1 -1
- package/modules/gridNMBidAdapter.js +1 -1
- package/modules/growthCodeIdSystem.js +18 -15
- package/modules/gumgumBidAdapter.js +1 -1
- package/modules/iqzoneBidAdapter.js +1 -1
- package/modules/ivsBidAdapter.js +85 -0
- package/modules/ivsBidAdapter.md +34 -0
- package/modules/ixBidAdapter.js +42 -105
- package/modules/jwplayerVideoProvider.js +25 -32
- package/modules/koblerBidAdapter.js +1 -2
- package/modules/kueezBidAdapter.js +1 -1
- package/modules/liveIntentIdSystem.js +8 -0
- package/modules/luponmediaBidAdapter.js +1 -1
- package/modules/magniteAnalyticsAdapter.js +76 -3
- package/modules/mathildeadsBidAdapter.js +1 -1
- package/modules/medianetBidAdapter.js +1 -1
- package/modules/mgidBidAdapter.js +178 -26
- package/modules/minutemediaBidAdapter.js +1 -1
- package/modules/oguryBidAdapter.js +3 -2
- package/modules/onomagicBidAdapter.js +1 -2
- package/modules/openxBidAdapter.js +192 -563
- package/modules/openxBidAdapter.md +22 -20
- package/modules/openxOrtbBidAdapter.js +13 -11
- package/modules/openxOrtbBidAdapter.md +5 -3
- package/modules/operaadsBidAdapter.js +1 -1
- package/modules/pubmaticBidAdapter.js +1 -1
- package/modules/pubxBidAdapter.js +5 -2
- package/modules/riseBidAdapter.js +1 -1
- package/modules/sharedIdSystem.js +4 -27
- package/modules/sharethroughBidAdapter.js +1 -1
- package/modules/shinezBidAdapter.js +1 -1
- package/modules/smarthubBidAdapter.js +1 -1
- package/modules/synacormediaBidAdapter.js +1 -3
- package/modules/truereachBidAdapter.js +1 -2
- package/modules/userId/eids.js +18 -0
- package/modules/userId/eids.md +16 -0
- package/modules/videoheroesBidAdapter.js +1 -1
- package/modules/vidoomyBidAdapter.js +22 -1
- package/modules/visiblemeasuresBidAdapter.js +1 -1
- package/modules/vrtcalBidAdapter.js +1 -1
- package/modules/yieldoneBidAdapter.js +1 -1
- package/package.json +1 -1
- package/src/Renderer.js +2 -1
- package/src/native.js +5 -1
- package/test/spec/auctionmanager_spec.js +2 -2
- package/test/spec/libraries/domainOverrideToRootDomain/index_spec.js +77 -0
- package/test/spec/modules/acuityAdsBidAdapter_spec.js +2 -1
- package/test/spec/modules/amxIdSystem_spec.js +13 -26
- package/test/spec/modules/appushBidAdapter_spec.js +2 -1
- package/test/spec/modules/beyondmediaBidAdapter_spec.js +2 -1
- package/test/spec/modules/compassBidAdapter_spec.js +2 -1
- package/test/spec/modules/connectIdSystem_spec.js +420 -242
- package/test/spec/modules/contentexchangeBidAdapter_spec.js +2 -1
- package/test/spec/modules/eids_spec.js +30 -0
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +37 -0
- package/test/spec/modules/globalsunBidAdapter_spec.js +2 -1
- package/test/spec/modules/iqzoneBidAdapter_spec.js +2 -1
- package/test/spec/modules/ivsBidAdapter_spec.js +197 -0
- package/test/spec/modules/ixBidAdapter_spec.js +84 -71
- package/test/spec/modules/koblerBidAdapter_spec.js +0 -20
- package/test/spec/modules/liveIntentIdSystem_spec.js +10 -0
- package/test/spec/modules/luponmediaBidAdapter_spec.js +1 -1
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +129 -1
- package/test/spec/modules/mathildeadsBidAdapter_spec.js +2 -1
- package/test/spec/modules/mgidBidAdapter_spec.js +184 -36
- package/test/spec/modules/oguryBidAdapter_spec.js +19 -4
- package/test/spec/modules/openxBidAdapter_spec.js +1157 -1936
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +12 -39
- package/test/spec/modules/pubxBidAdapter_spec.js +10 -2
- package/test/spec/modules/sharedIdSystem_spec.js +0 -46
- package/test/spec/modules/sharethroughBidAdapter_spec.js +2 -1
- package/test/spec/modules/smarthubBidAdapter_spec.js +2 -1
- package/test/spec/modules/synacormediaBidAdapter_spec.js +0 -26
- package/test/spec/modules/videoModule/submodules/jwplayerVideoProvider_spec.js +17 -4
- package/test/spec/modules/vidoomyBidAdapter_spec.js +35 -0
- package/test/spec/modules/visiblemeasuresBidAdapter_spec.js +2 -1
- package/test/spec/modules/vrtcalBidAdapter_spec.js +3 -2
- package/test/spec/renderer_spec.js +1 -2
|
@@ -300,6 +300,18 @@ describe('OpenxRtbAdapter', function () {
|
|
|
300
300
|
});
|
|
301
301
|
|
|
302
302
|
context('common requests checks', function() {
|
|
303
|
+
it('should be able to handle multiformat requests', () => {
|
|
304
|
+
const multiformat = utils.deepClone(bidRequestsWithMediaTypes[0]);
|
|
305
|
+
multiformat.mediaTypes.video = {
|
|
306
|
+
context: 'outstream',
|
|
307
|
+
playerSize: [640, 480]
|
|
308
|
+
}
|
|
309
|
+
const requests = spec.buildRequests([multiformat], mockBidderRequest);
|
|
310
|
+
const outgoingFormats = requests.flatMap(rq => rq.data.imp.flatMap(imp => ['banner', 'video'].filter(k => imp[k] != null)));
|
|
311
|
+
const expected = FEATURES.VIDEO ? ['banner', 'video'] : ['banner']
|
|
312
|
+
expect(outgoingFormats).to.have.members(expected);
|
|
313
|
+
})
|
|
314
|
+
|
|
303
315
|
it('should send bid request to openx url via POST', function () {
|
|
304
316
|
const request = spec.buildRequests(bidRequestsWithMediaTypes, mockBidderRequest);
|
|
305
317
|
expect(request[0].url).to.equal(REQUEST_URL);
|
|
@@ -1084,45 +1096,6 @@ describe('OpenxRtbAdapter', function () {
|
|
|
1084
1096
|
});
|
|
1085
1097
|
});
|
|
1086
1098
|
}
|
|
1087
|
-
|
|
1088
|
-
it.skip('should send ad unit ids when any are defined', function () {
|
|
1089
|
-
const bidRequestsWithUnitIds = [{
|
|
1090
|
-
bidder: 'openx',
|
|
1091
|
-
params: {
|
|
1092
|
-
delDomain: 'test-del-domain'
|
|
1093
|
-
},
|
|
1094
|
-
adUnitCode: 'adunit-code',
|
|
1095
|
-
mediaTypes: {
|
|
1096
|
-
banner: {
|
|
1097
|
-
sizes: [[300, 250], [300, 600]]
|
|
1098
|
-
}
|
|
1099
|
-
},
|
|
1100
|
-
bidId: 'test-bid-id-1',
|
|
1101
|
-
bidderRequestId: 'test-bid-request-1',
|
|
1102
|
-
auctionId: 'test-auction-1',
|
|
1103
|
-
transactionId: 'test-transaction-id-1'
|
|
1104
|
-
}, {
|
|
1105
|
-
bidder: 'openx',
|
|
1106
|
-
params: {
|
|
1107
|
-
unit: '22',
|
|
1108
|
-
delDomain: 'test-del-domain'
|
|
1109
|
-
},
|
|
1110
|
-
adUnitCode: 'adunit-code',
|
|
1111
|
-
mediaTypes: {
|
|
1112
|
-
banner: {
|
|
1113
|
-
sizes: [[728, 90]]
|
|
1114
|
-
}
|
|
1115
|
-
},
|
|
1116
|
-
bidId: 'test-bid-id-2',
|
|
1117
|
-
bidderRequestId: 'test-bid-request-2',
|
|
1118
|
-
auctionId: 'test-auction-2',
|
|
1119
|
-
transactionId: 'test-transaction-id-2'
|
|
1120
|
-
}];
|
|
1121
|
-
mockBidderRequest.bids = bidRequestsWithUnitIds;
|
|
1122
|
-
const request = spec.buildRequests(bidRequestsWithUnitIds, mockBidderRequest);
|
|
1123
|
-
expect(request[0].data.imp[1].tagid).to.equal(bidRequestsWithUnitIds[1].params.unit);
|
|
1124
|
-
expect(request[0].data.imp[1].ext.divid).to.equal(bidRequestsWithUnitIds[1].params.adUnitCode);
|
|
1125
|
-
});
|
|
1126
1099
|
});
|
|
1127
1100
|
|
|
1128
1101
|
describe('interpretResponse()', function () {
|
|
@@ -39,14 +39,22 @@ describe('pubxAdapter', function () {
|
|
|
39
39
|
id: '26c1ee0038ac11',
|
|
40
40
|
params: {
|
|
41
41
|
sid: '12345abc'
|
|
42
|
+
},
|
|
43
|
+
ortb2: {
|
|
44
|
+
site: {
|
|
45
|
+
page: `${location.href}?test=1`
|
|
46
|
+
}
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
49
|
];
|
|
45
50
|
|
|
46
51
|
const data = {
|
|
47
52
|
banner: {
|
|
48
|
-
sid: '12345abc'
|
|
49
|
-
|
|
53
|
+
sid: '12345abc',
|
|
54
|
+
pu: encodeURIComponent(
|
|
55
|
+
utils.deepAccess(bidRequests[0], 'ortb2.site.page').replace(/\?.*$/, '')
|
|
56
|
+
),
|
|
57
|
+
},
|
|
50
58
|
};
|
|
51
59
|
|
|
52
60
|
it('sends bid request to ENDPOINT via GET', function () {
|
|
@@ -91,50 +91,4 @@ describe('SharedId System', function () {
|
|
|
91
91
|
expect(result).to.be.undefined;
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
|
-
|
|
95
|
-
describe('SharedID System domainOverride', () => {
|
|
96
|
-
let sandbox, domain, cookies, rejectCookiesFor;
|
|
97
|
-
|
|
98
|
-
beforeEach(() => {
|
|
99
|
-
sandbox = sinon.createSandbox();
|
|
100
|
-
sandbox.stub(document, 'domain').get(() => domain);
|
|
101
|
-
cookies = {};
|
|
102
|
-
sandbox.stub(storage, 'getCookie').callsFake((key) => cookies[key]);
|
|
103
|
-
rejectCookiesFor = null;
|
|
104
|
-
sandbox.stub(storage, 'setCookie').callsFake((key, value, expires, sameSite, domain) => {
|
|
105
|
-
if (domain !== rejectCookiesFor) {
|
|
106
|
-
if (expires != null) {
|
|
107
|
-
expires = new Date(expires);
|
|
108
|
-
}
|
|
109
|
-
if (expires == null || expires > Date.now()) {
|
|
110
|
-
cookies[key] = value;
|
|
111
|
-
} else {
|
|
112
|
-
delete cookies[key];
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
afterEach(() => {
|
|
119
|
-
sandbox.restore();
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
it('should return TLD if cookies can be set there', () => {
|
|
123
|
-
domain = 'sub.domain.com';
|
|
124
|
-
rejectCookiesFor = 'com';
|
|
125
|
-
expect(sharedIdSystemSubmodule.domainOverride()).to.equal('domain.com');
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
it('should return undefined when cookies cannot be set', () => {
|
|
129
|
-
domain = 'sub.domain.com';
|
|
130
|
-
rejectCookiesFor = 'sub.domain.com';
|
|
131
|
-
expect(sharedIdSystemSubmodule.domainOverride()).to.be.undefined;
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
it('should return half-way domain if parent domain rejects cookies', () => {
|
|
135
|
-
domain = 'inner.outer.domain.com';
|
|
136
|
-
rejectCookiesFor = 'domain.com';
|
|
137
|
-
expect(sharedIdSystemSubmodule.domainOverride()).to.equal('outer.domain.com');
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
94
|
});
|
|
@@ -91,7 +91,8 @@ describe('SmartHubBidAdapter', function () {
|
|
|
91
91
|
gdprConsent: 'COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw',
|
|
92
92
|
refererInfo: {
|
|
93
93
|
page: 'https://test.com'
|
|
94
|
-
}
|
|
94
|
+
},
|
|
95
|
+
timeout: 500
|
|
95
96
|
};
|
|
96
97
|
|
|
97
98
|
describe('isBidRequestValid', function () {
|
|
@@ -313,32 +313,6 @@ describe('synacormediaBidAdapter ', function () {
|
|
|
313
313
|
expect(req.data.tmax).to.eql(bidderRequestWithTimeout.timeout);
|
|
314
314
|
});
|
|
315
315
|
|
|
316
|
-
it('should return tmax equal to smaller global timeout', function () {
|
|
317
|
-
let sandbox = sinon.sandbox.create();
|
|
318
|
-
sandbox.stub(config, 'getConfig').callsFake(key => {
|
|
319
|
-
const config = {
|
|
320
|
-
'bidderTimeout': bidderRequestWithTimeout.timeout - 100
|
|
321
|
-
};
|
|
322
|
-
return config[key];
|
|
323
|
-
});
|
|
324
|
-
let req = spec.buildRequests([validBidRequest], bidderRequestWithTimeout);
|
|
325
|
-
sandbox.restore();
|
|
326
|
-
expect(req.data.tmax).to.eql(bidderRequestWithTimeout.timeout - 100);
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
it('should return tmax equal to smaller callback timeout', function () {
|
|
330
|
-
let sandbox = sinon.sandbox.create();
|
|
331
|
-
sandbox.stub(config, 'getConfig').callsFake(key => {
|
|
332
|
-
const config = {
|
|
333
|
-
'bidderTimeout': bidderRequestWithTimeout.timeout + 100
|
|
334
|
-
};
|
|
335
|
-
return config[key];
|
|
336
|
-
});
|
|
337
|
-
let req = spec.buildRequests([validBidRequest], bidderRequestWithTimeout);
|
|
338
|
-
sandbox.restore();
|
|
339
|
-
expect(req.data.tmax).to.eql(bidderRequestWithTimeout.timeout);
|
|
340
|
-
});
|
|
341
|
-
|
|
342
316
|
it('should return multiple bids when multiple valid requests with the same seatId are used', function () {
|
|
343
317
|
let secondBidRequest = {
|
|
344
318
|
bidId: 'foobar',
|
|
@@ -19,7 +19,7 @@ import { PLAYBACK_MODE } from 'libraries/video/constants/constants.js';
|
|
|
19
19
|
function getPlayerMock() {
|
|
20
20
|
return makePlayerFactoryMock({
|
|
21
21
|
getState: function () {},
|
|
22
|
-
setup: function () {},
|
|
22
|
+
setup: function () { return this; },
|
|
23
23
|
getViewable: function () {},
|
|
24
24
|
getPercentViewable: function () {},
|
|
25
25
|
getMute: function () {},
|
|
@@ -30,8 +30,8 @@ function getPlayerMock() {
|
|
|
30
30
|
getFullscreen: function () {},
|
|
31
31
|
getPlaylistItem: function () {},
|
|
32
32
|
playAd: function () {},
|
|
33
|
-
on: function () {},
|
|
34
|
-
off: function () {},
|
|
33
|
+
on: function () { return this; },
|
|
34
|
+
off: function () { return this; },
|
|
35
35
|
remove: function () {},
|
|
36
36
|
getAudioTracks: function () {},
|
|
37
37
|
getCurrentAudioTrack: function () {},
|
|
@@ -142,7 +142,7 @@ describe('JWPlayerProvider', function () {
|
|
|
142
142
|
it('should instantiate the player when uninstantiated', function () {
|
|
143
143
|
const player = getPlayerMock();
|
|
144
144
|
config.playerConfig = {};
|
|
145
|
-
const setupSpy = player.setup = sinon.spy();
|
|
145
|
+
const setupSpy = player.setup = sinon.spy(player.setup);
|
|
146
146
|
const provider = JWPlayerProvider(config, makePlayerFactoryMock(player), adState, timeState, callbackStorage, utilsMock, sharedUtils);
|
|
147
147
|
provider.init();
|
|
148
148
|
expect(setupSpy.calledOnce).to.be.true;
|
|
@@ -158,6 +158,19 @@ describe('JWPlayerProvider', function () {
|
|
|
158
158
|
expect(setupComplete.calledOnce).to.be.true;
|
|
159
159
|
});
|
|
160
160
|
|
|
161
|
+
it('should support multiple setup complete event handlers', function () {
|
|
162
|
+
const player = getPlayerMock();
|
|
163
|
+
player.getState = () => 'idle';
|
|
164
|
+
const provider = JWPlayerProvider(config, makePlayerFactoryMock(player), adState, timeState, callbackStorage, utilsMock, sharedUtils);
|
|
165
|
+
const setupComplete = sinon.spy();
|
|
166
|
+
const setupComplete2 = sinon.spy();
|
|
167
|
+
provider.onEvent(SETUP_COMPLETE, setupComplete, {});
|
|
168
|
+
provider.onEvent(SETUP_COMPLETE, setupComplete2, {});
|
|
169
|
+
provider.init();
|
|
170
|
+
expect(setupComplete.calledOnce).to.be.true;
|
|
171
|
+
expect(setupComplete2.calledOnce).to.be.true;
|
|
172
|
+
});
|
|
173
|
+
|
|
161
174
|
it('should not reinstantiate player', function () {
|
|
162
175
|
const player = getPlayerMock();
|
|
163
176
|
player.getState = () => 'idle';
|
|
@@ -161,6 +161,41 @@ describe('vidoomyBidAdapter', function() {
|
|
|
161
161
|
expect(request[0].data).to.include.any.keys('schain');
|
|
162
162
|
expect(request[0].data.schain).to.eq(serializedForm);
|
|
163
163
|
});
|
|
164
|
+
|
|
165
|
+
it('should set the bidfloor if getFloor module is undefined but static bidfloor is present', function () {
|
|
166
|
+
const request = { ...bidRequests[0], params: { bidfloor: 2.5 } }
|
|
167
|
+
const req = spec.buildRequests([request], bidderRequest)[0];
|
|
168
|
+
expect(req.data).to.include.any.keys('bidfloor');
|
|
169
|
+
expect(req.data.bidfloor).to.equal(2.5);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
describe('floorModule', function () {
|
|
173
|
+
const getFloordata = {
|
|
174
|
+
'currency': 'USD',
|
|
175
|
+
'floor': 1.60
|
|
176
|
+
};
|
|
177
|
+
bidRequests[0].getFloor = _ => {
|
|
178
|
+
return getFloordata;
|
|
179
|
+
};
|
|
180
|
+
it('should return getFloor.floor if present', function () {
|
|
181
|
+
const request = spec.buildRequests(bidRequests, bidderRequest)[0];
|
|
182
|
+
expect(request.data.bidfloor).to.equal(getFloordata.floor);
|
|
183
|
+
});
|
|
184
|
+
it('should return the getFloor.floor if it is greater than static bidfloor', function () {
|
|
185
|
+
const bidfloor = 1.40;
|
|
186
|
+
const request = { ...bidRequests[0] };
|
|
187
|
+
request.params.bidfloor = bidfloor;
|
|
188
|
+
const bidRequest = spec.buildRequests([request], bidderRequest)[0];
|
|
189
|
+
expect(bidRequest.data.bidfloor).to.equal(getFloordata.floor);
|
|
190
|
+
});
|
|
191
|
+
it('should return the static bidfloor if it is greater than getFloor.floor', function () {
|
|
192
|
+
const bidfloor = 1.90;
|
|
193
|
+
const request = { ...bidRequests[0] };
|
|
194
|
+
request.params.bidfloor = bidfloor;
|
|
195
|
+
const bidRequest = spec.buildRequests([request], bidderRequest)[0];
|
|
196
|
+
expect(bidRequest.data.bidfloor).to.equal(bidfloor);
|
|
197
|
+
});
|
|
198
|
+
});
|
|
164
199
|
});
|
|
165
200
|
|
|
166
201
|
describe('interpretResponse', function () {
|
|
@@ -78,7 +78,8 @@ describe('VisibleMeasuresBidAdapter', function () {
|
|
|
78
78
|
gdprConsent: 'COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw',
|
|
79
79
|
refererInfo: {
|
|
80
80
|
referer: 'https://test.com'
|
|
81
|
-
}
|
|
81
|
+
},
|
|
82
|
+
timeout: 500
|
|
82
83
|
};
|
|
83
84
|
|
|
84
85
|
describe('isBidRequestValid', function () {
|
|
@@ -28,7 +28,8 @@ describe('vrtcalBidAdapter', function () {
|
|
|
28
28
|
'bidId': 'bidID0001',
|
|
29
29
|
'bidderRequestId': 'br0001',
|
|
30
30
|
'auctionId': 'auction0001',
|
|
31
|
-
'userIdAsEids': {}
|
|
31
|
+
'userIdAsEids': {},
|
|
32
|
+
timeout: 435
|
|
32
33
|
}
|
|
33
34
|
];
|
|
34
35
|
|
|
@@ -95,7 +96,7 @@ describe('vrtcalBidAdapter', function () {
|
|
|
95
96
|
w: 300,
|
|
96
97
|
h: 250,
|
|
97
98
|
crid: 'v2_1064_vrt_vrtcaltestdisplay2_300_250',
|
|
98
|
-
adomain: ['vrtcal.com']
|
|
99
|
+
adomain: ['vrtcal.com'],
|
|
99
100
|
}],
|
|
100
101
|
seat: '16'
|
|
101
102
|
}],
|
|
@@ -52,7 +52,7 @@ describe('Renderer', function () {
|
|
|
52
52
|
expect(testRenderer2.getConfig()).to.deep.equal({ test: 'config2' });
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
it('sets a render function with setRender method', function () {
|
|
55
|
+
it('sets a render function with the setRender method', function () {
|
|
56
56
|
testRenderer1.setRender(spyRenderFn);
|
|
57
57
|
expect(typeof testRenderer1.render).to.equal('function');
|
|
58
58
|
testRenderer1.render();
|
|
@@ -110,7 +110,6 @@ describe('Renderer', function () {
|
|
|
110
110
|
|
|
111
111
|
it('renders immediately when requested', function () {
|
|
112
112
|
const testRenderer3 = Renderer.install({
|
|
113
|
-
url: 'https://httpbin.org/post',
|
|
114
113
|
config: { test: 'config2' },
|
|
115
114
|
id: 2,
|
|
116
115
|
renderNow: true
|