diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index 3bf14eb11cb..60d56cfc8ad 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -4,7 +4,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js'; const BIDDER_CODE = 'oneVideo'; export const spec = { code: 'oneVideo', - VERSION: '3.0.6', + VERSION: '3.0.7', ENDPOINT: 'https://ads.adaptv.advertising.com/rtb/openrtb?ext_id=', E2ETESTENDPOINT: 'https://ads-wc.v.ssp.yahoo.com/rtb/openrtb?ext_id=', SYNC_ENDPOINT1: 'https://pixel.advertising.com/ups/57304/sync?gdpr=&gdpr_consent=&_origin=0&redir=true', @@ -312,7 +312,7 @@ function getRequestData(bid, consentData, bidRequest) { } } if (bid.params.video.content && utils.isPlainObject(bid.params.video.content)) { - bidData.imp[0].content = {}; + bidData.site.content = {}; const contentStringKeys = ['id', 'title', 'series', 'season', 'genre', 'contentrating', 'language']; const contentNumberkeys = ['episode', 'prodq', 'context', 'livestream', 'len']; const contentArrayKeys = ['cat']; @@ -324,7 +324,7 @@ function getRequestData(bid, consentData, bidRequest) { (contentObjectKeys.indexOf(contentKey) > -1 && utils.isPlainObject(bid.params.video.content[contentKey])) || (contentArrayKeys.indexOf(contentKey) > -1 && utils.isArray(bid.params.video.content[contentKey]) && bid.params.video.content[contentKey].every(catStr => utils.isStr(catStr)))) { - bidData.imp[0].content[contentKey] = bid.params.video.content[contentKey]; + bidData.site.content[contentKey] = bid.params.video.content[contentKey]; } else { utils.logMessage('oneVideo bid adapter validation error: ', contentKey, ' is either not supported is OpenRTB V2.5 or value is undefined'); } diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index 9ee1045a6e8..903bc191b47 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -221,7 +221,7 @@ describe('OneVideoBidAdapter', function () { const placement = bidRequest.params.video.placement; const rewarded = bidRequest.params.video.rewarded; const inventoryid = bidRequest.params.video.inventoryid; - const VERSION = '3.0.6'; + const VERSION = '3.0.7'; expect(data.imp[0].video.w).to.equal(width); expect(data.imp[0].video.h).to.equal(height); expect(data.imp[0].bidfloor).to.equal(bidRequest.params.bidfloor); @@ -387,37 +387,37 @@ describe('OneVideoBidAdapter', function () { bidRequest.params.video.content = null; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.undefined; + expect(data.site.content).to.be.undefined; }); it('should not accept content object if value is is Array ', function () { bidRequest.params.video.content = []; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.undefined; + expect(data.site.content).to.be.undefined; }); it('should not accept content object if value is Number ', function () { bidRequest.params.video.content = 123456; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.undefined; + expect(data.site.content).to.be.undefined; }); it('should not accept content object if value is String ', function () { bidRequest.params.video.content = 'keyValuePairs'; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.undefined; + expect(data.site.content).to.be.undefined; }); it('should not accept content object if value is Boolean ', function () { bidRequest.params.video.content = true; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.undefined; + expect(data.site.content).to.be.undefined; }); it('should accept content object if value is Object ', function () { bidRequest.params.video.content = {}; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.a('object'); + expect(data.site.content).to.be.a('object'); }); it('should not append unsupported content object keys', function () { @@ -428,7 +428,7 @@ describe('OneVideoBidAdapter', function () { }; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.empty; + expect(data.site.content).to.be.empty; }); it('should not append content string parameters if value is not string ', function () { @@ -443,8 +443,8 @@ describe('OneVideoBidAdapter', function () { }; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.a('object'); - expect(data.imp[0].content).to.be.empty + expect(data.site.content).to.be.a('object'); + expect(data.site.content).to.be.empty }); it('should not append content Number parameters if value is not Number ', function () { bidRequest.params.video.content = { @@ -456,8 +456,8 @@ describe('OneVideoBidAdapter', function () { }; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.a('object'); - expect(data.imp[0].content).to.be.empty + expect(data.site.content).to.be.a('object'); + expect(data.site.content).to.be.empty }); it('should not append content Array parameters if value is not Array ', function () { bidRequest.params.video.content = { @@ -465,8 +465,8 @@ describe('OneVideoBidAdapter', function () { }; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.a('object'); - expect(data.imp[0].content).to.be.empty + expect(data.site.content).to.be.a('object'); + expect(data.site.content).to.be.empty }); it('should not append content ext if value is not Object ', function () { bidRequest.params.video.content = { @@ -474,8 +474,8 @@ describe('OneVideoBidAdapter', function () { }; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.be.a('object'); - expect(data.imp[0].content).to.be.empty + expect(data.site.content).to.be.a('object'); + expect(data.site.content).to.be.empty }); it('should append supported parameters if value match validations ', function () { bidRequest.params.video.content = { @@ -498,7 +498,7 @@ describe('OneVideoBidAdapter', function () { }; const requests = spec.buildRequests([bidRequest], bidderRequest); const data = requests[0].data; - expect(data.imp[0].content).to.deep.equal(bidRequest.params.video.content); + expect(data.site.content).to.deep.equal(bidRequest.params.video.content); }); }); });