Skip to content

Commit

Permalink
ADAPTER UPDATES (prebid#10602)
Browse files Browse the repository at this point in the history
ADAPTER UPDATES FOR ALIAS

Co-authored-by: newspassid-prebid <[email protected]>
  • Loading branch information
AskRupert-DM and newspassid-prebid authored Nov 1, 2023
1 parent 9630925 commit 981459b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/ozoneBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const AUCTIONURI = '/openrtb2/auction';
const OZONECOOKIESYNC = '/static/load-cookie.html';
const OZONE_RENDERER_URL = 'https://prebid.the-ozone-project.com/ozone-renderer.js';
const ORIGIN_DEV = 'https://test.ozpr.net';
const OZONEVERSION = '2.9.0';
const OZONEVERSION = '2.9.1';
export const spec = {
gvlid: 524,
aliases: [{code: 'lmc', gvlid: 524}],
aliases: [{code: 'lmc', gvlid: 524}, {code: 'venatus', gvlid: 524}],
version: OZONEVERSION,
code: BIDDER_CODE,
supportedMediaTypes: [VIDEO, BANNER],
Expand Down Expand Up @@ -78,6 +78,9 @@ export const spec = {
if (bidderConfig.hasOwnProperty('batchRequests')) {
this.propertyBag.whitelabel.batchRequests = bidderConfig.batchRequests;
}
if (arr.hasOwnProperty('batchRequests')) {
this.propertyBag.whitelabel.batchRequests = true;
}
try {
if (arr.hasOwnProperty('auction') && arr.auction === 'dev') {
logInfo('GET: auction=dev');
Expand All @@ -100,6 +103,7 @@ export const spec = {
return this.propertyBag.whitelabel.rendererUrl;
},
isBatchRequests() {
logInfo('isBatchRequests going to return ', this.propertyBag.whitelabel.batchRequests);
return this.propertyBag.whitelabel.batchRequests;
},
isBidRequestValid(bid) {
Expand Down
13 changes: 13 additions & 0 deletions test/spec/modules/ozoneBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2069,6 +2069,19 @@ describe('ozone Adapter', function () {
expect(request.length).to.equal(3);
config.resetConfig();
});
it('should not batch into 10s if config is set to false and singleRequest is true', function () {
config.setConfig({ozone: {'batchRequests': false, 'singleRequest': true}});
var specMock = utils.deepClone(spec);
let arrReq = [];
for (let i = 0; i < 15; i++) {
let b = validBidRequests[0];
b.adUnitCode += i;
arrReq.push(b);
}
const request = specMock.buildRequests(arrReq, validBidderRequest);
expect(request.method).to.equal('POST');
config.resetConfig();
});
it('should use GET values auction=dev & cookiesync=dev if set', function() {
var specMock = utils.deepClone(spec);
specMock.getGetParametersAsObject = function() {
Expand Down

0 comments on commit 981459b

Please sign in to comment.