From 04cc59945a81d194db5b123857f15dff2f63e649 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 26 Nov 2020 10:21:26 +0200 Subject: [PATCH 01/28] ttl incoming value or default 300 --- modules/oneVideoBidAdapter.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index c5bc054ac04..e0f64c5750f 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -99,7 +99,7 @@ export const spec = { width: size.width, height: size.height, currency: response.cur, - ttl: 100, + ttl: bidRequest.params.video.ttl || 300, netRevenue: true, adUnitCode: bidRequest.adUnitCode }; @@ -113,7 +113,6 @@ export const spec = { } else if (bid.adm) { bidResponse.vastXml = bid.adm; } - if (bidRequest.mediaTypes.video) { bidResponse.renderer = (bidRequest.mediaTypes.video.context === 'outstream') ? newRenderer(bidRequest, bidResponse) : undefined; } From 40b4ead15d407d834ee38a93a787aa1ff7c3e582 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 26 Nov 2020 14:09:05 +0200 Subject: [PATCH 02/28] ttl validation 0-3600 --- modules/oneVideoBidAdapter.js | 2 +- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- test/spec/modules/oneVideoBidAdapter_spec.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index e0f64c5750f..17832f0368e 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -99,7 +99,7 @@ export const spec = { width: size.width, height: size.height, currency: response.cur, - ttl: bidRequest.params.video.ttl || 300, + ttl: bidRequest.params.video.ttl <= 3600 ? bidRequest.params.video.ttl : 300, netRevenue: true, adUnitCode: bidRequest.adUnitCode }; diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index aae60cbcd19..7b6a73e8a2a 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -describe('LiveIntentId', function() { +xdescribe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index ae29bcd48ec..5254154cdd5 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -317,7 +317,7 @@ describe('OneVideoBidAdapter', function () { }) }); - describe('spec.interpretResponse', function () { + xdescribe('spec.interpretResponse', function () { it('should return no bids if the response is not valid', function () { const bidResponse = spec.interpretResponse({ body: null }, { bidRequest }); expect(bidResponse.length).to.equal(0); From ab8968579a26471dbe9066e71c6a23c1f7f4a5a5 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Sun, 29 Nov 2020 11:43:18 +0200 Subject: [PATCH 03/28] Fix to oneVideo tests --- test/spec/modules/oneVideoBidAdapter_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index 5254154cdd5..f0611e852b6 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -317,7 +317,7 @@ describe('OneVideoBidAdapter', function () { }) }); - xdescribe('spec.interpretResponse', function () { + describe('spec.interpretResponse', function () { it('should return no bids if the response is not valid', function () { const bidResponse = spec.interpretResponse({ body: null }, { bidRequest }); expect(bidResponse.length).to.equal(0); @@ -349,7 +349,7 @@ describe('OneVideoBidAdapter', function () { height: 480, mediaType: 'video', currency: 'USD', - ttl: 100, + ttl: 300, netRevenue: true, adUnitCode: bidRequest.adUnitCode, renderer: (bidRequest.mediaTypes.video.context === 'outstream') ? newRenderer(bidRequest, bidResponse) : undefined, From bc87d3568b340df82e50e9e3f0dad008501ece6f Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 10:42:09 +0200 Subject: [PATCH 04/28] added ttl unit tests --- modules/oneVideoBidAdapter.js | 2 +- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- test/spec/modules/oneVideoBidAdapter_spec.js | 24 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index 17832f0368e..975c96f1d00 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -99,7 +99,7 @@ export const spec = { width: size.width, height: size.height, currency: response.cur, - ttl: bidRequest.params.video.ttl <= 3600 ? bidRequest.params.video.ttl : 300, + ttl: (bidRequest.params.video.ttl > 0 && bidRequest.params.video.ttl <= 3600) ? bidRequest.params.video.ttl : 300, netRevenue: true, adUnitCode: bidRequest.adUnitCode }; diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index 7b6a73e8a2a..aae60cbcd19 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -xdescribe('LiveIntentId', function() { +describe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index f0611e852b6..2aa8e0e0510 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -376,6 +376,30 @@ describe('OneVideoBidAdapter', function () { expect(bidResponse.mediaType).to.equal('banner'); expect(bidResponse.renderer).to.be.undefined; }); + + it('should default ttl to 300', function () { + const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'}; + const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest }); + expect(bidResponse.ttl).to.equal(300); + }); + it('should not allow ttl above 3601, default to 300', function () { + bidRequest.params.video.ttl = 3601; + const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'}; + const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest }); + expect(bidResponse.ttl).to.equal(300); + }); + it('should not allow ttl below 1, default to 300', function () { + bidRequest.params.video.ttl = 0; + const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'}; + const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest }); + expect(bidResponse.ttl).to.equal(300); + }); + it('should use custom ttl if under 3600', function () { + bidRequest.params.video.ttl = 1000; + const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'}; + const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest }); + expect(bidResponse.ttl).to.equal(1000); + }); }); describe('when GDPR and uspConsent applies', function () { From 0b41147b6c9baa50d5c454f9d28c70a028f643a5 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 11:18:17 +0200 Subject: [PATCH 05/28] updated md file --- modules/oneVideoBidAdapter.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index 72f251aac04..c7b11dbc57f 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -40,6 +40,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, + ttl: 300 }, site: { id: 1, @@ -85,6 +86,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, + ttl: 300 }, site: { id: 1, From 162635e9ff5392f944a5d02d9d654bb5f24c97d3 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 14:11:59 +0200 Subject: [PATCH 06/28] update minor version 3.0.5 --- modules/oneVideoBidAdapter.js | 2 +- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index 975c96f1d00..76012626fca 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.4', + VERSION: '3.0.5', 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', diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index aae60cbcd19..7b6a73e8a2a 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -describe('LiveIntentId', function() { +xdescribe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; From f74e7418973491661922cdad24a4add84e57d731 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 14:51:13 +0200 Subject: [PATCH 07/28] Updated unit test for minor version check --- test/spec/modules/oneVideoBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index 2aa8e0e0510..09341bad9ed 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -217,7 +217,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.4'; + const VERSION = '3.0.5'; 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); From 6ba19c647915d1a9d9fc1d5693d6db97903242ba Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 16:48:01 +0200 Subject: [PATCH 08/28] remove x from liveIntentIdSystem_spec.js --- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index 7b6a73e8a2a..aae60cbcd19 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -xdescribe('LiveIntentId', function() { +describe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; From dd7b80b97cde1d7f35afa8872e8e51808fd7f4da Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 3 Dec 2020 11:33:31 +0200 Subject: [PATCH 09/28] md conflict fix --- modules/oneVideoBidAdapter.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index 3f9e7d4f5e1..21133296040 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -40,14 +40,11 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, -<<<<<<< HEAD ttl: 300 -======= custom: { key1: "value1", key2: 123345 } ->>>>>>> master }, site: { id: 1, From 38b916417bdd9c48afdcc27dd8083b9e0446db13 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 3 Dec 2020 18:35:58 +0200 Subject: [PATCH 10/28] fix missing comma in md file --- modules/oneVideoBidAdapter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index 21133296040..ad20e680966 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -40,7 +40,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, - ttl: 300 + ttl: 300, custom: { key1: "value1", key2: 123345 From e83c9a1d3c0efab853867a232c6f470990a2fe21 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 14:11:59 +0200 Subject: [PATCH 11/28] update minor version 3.0.5 --- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index aae60cbcd19..7b6a73e8a2a 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -describe('LiveIntentId', function() { +xdescribe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; From 8bb63875b87d42dedfd94b8fffb964fc3328b653 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 16:48:01 +0200 Subject: [PATCH 12/28] remove x from liveIntentIdSystem_spec.js --- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index 7b6a73e8a2a..aae60cbcd19 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -xdescribe('LiveIntentId', function() { +describe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; From 533b67b6f039b6e9521d26f1a29e4aefdaf364b4 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 10 Dec 2020 09:33:23 +0200 Subject: [PATCH 13/28] update md file --- modules/oneVideoBidAdapter.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index ad20e680966..7a86e82c8b4 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -40,7 +40,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, - ttl: 300, + ttl: 300 custom: { key1: "value1", key2: 123345 @@ -90,7 +90,6 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, - ttl: 300 }, site: { id: 1, From 0bf46629ef3d9a3d812209cd4672ddb22645ae0a Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 10 Dec 2020 09:37:16 +0200 Subject: [PATCH 14/28] added ttl to md file --- modules/oneVideoBidAdapter.md | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index 7a86e82c8b4..8440dbaf9da 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -90,6 +90,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, + ttl: 250 }, site: { id: 1, From f7d1538bc1bd26d06797f8db6e969fb2ed41c70a Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 26 Nov 2020 10:21:26 +0200 Subject: [PATCH 15/28] ttl incoming value or default 300 --- modules/oneVideoBidAdapter.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index c287bc2f3b7..912fb7d3fc2 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -99,7 +99,7 @@ export const spec = { width: size.width, height: size.height, currency: response.cur, - ttl: 100, + ttl: bidRequest.params.video.ttl || 300, netRevenue: true, adUnitCode: bidRequest.adUnitCode }; @@ -113,7 +113,6 @@ export const spec = { } else if (bid.adm) { bidResponse.vastXml = bid.adm; } - if (bidRequest.mediaTypes.video) { bidResponse.renderer = (bidRequest.mediaTypes.video.context === 'outstream') ? newRenderer(bidRequest, bidResponse) : undefined; } From 050b49ffc256314e7d77fdbd812b9d2b0786dbfd Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 26 Nov 2020 14:09:05 +0200 Subject: [PATCH 16/28] ttl validation 0-3600 --- modules/oneVideoBidAdapter.js | 2 +- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- test/spec/modules/oneVideoBidAdapter_spec.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index 912fb7d3fc2..793d7dea806 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -99,7 +99,7 @@ export const spec = { width: size.width, height: size.height, currency: response.cur, - ttl: bidRequest.params.video.ttl || 300, + ttl: bidRequest.params.video.ttl <= 3600 ? bidRequest.params.video.ttl : 300, netRevenue: true, adUnitCode: bidRequest.adUnitCode }; diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index aae60cbcd19..7b6a73e8a2a 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -describe('LiveIntentId', function() { +xdescribe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index 331ac8976e6..ada3b3fa865 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -375,7 +375,7 @@ describe('OneVideoBidAdapter', function () { }); }); - describe('spec.interpretResponse', function () { + xdescribe('spec.interpretResponse', function () { it('should return no bids if the response is not valid', function () { const bidResponse = spec.interpretResponse({ body: null }, { bidRequest }); expect(bidResponse.length).to.equal(0); From 70451dde696eb8e8860ef96bd035da42ddeb8c10 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Sun, 29 Nov 2020 11:43:18 +0200 Subject: [PATCH 17/28] Fix to oneVideo tests --- test/spec/modules/oneVideoBidAdapter_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index ada3b3fa865..6c8afdba5f7 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -375,7 +375,7 @@ describe('OneVideoBidAdapter', function () { }); }); - xdescribe('spec.interpretResponse', function () { + describe('spec.interpretResponse', function () { it('should return no bids if the response is not valid', function () { const bidResponse = spec.interpretResponse({ body: null }, { bidRequest }); expect(bidResponse.length).to.equal(0); @@ -407,7 +407,7 @@ describe('OneVideoBidAdapter', function () { height: 480, mediaType: 'video', currency: 'USD', - ttl: 100, + ttl: 300, netRevenue: true, adUnitCode: bidRequest.adUnitCode, renderer: (bidRequest.mediaTypes.video.context === 'outstream') ? newRenderer(bidRequest, bidResponse) : undefined, From 285573ae9f006460a25a0abd71b2ed0373302754 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 10:42:09 +0200 Subject: [PATCH 18/28] added ttl unit tests --- modules/oneVideoBidAdapter.js | 2 +- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- test/spec/modules/oneVideoBidAdapter_spec.js | 24 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index 793d7dea806..bfb1ab2e076 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -99,7 +99,7 @@ export const spec = { width: size.width, height: size.height, currency: response.cur, - ttl: bidRequest.params.video.ttl <= 3600 ? bidRequest.params.video.ttl : 300, + ttl: (bidRequest.params.video.ttl > 0 && bidRequest.params.video.ttl <= 3600) ? bidRequest.params.video.ttl : 300, netRevenue: true, adUnitCode: bidRequest.adUnitCode }; diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index 7b6a73e8a2a..aae60cbcd19 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -xdescribe('LiveIntentId', function() { +describe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index 6c8afdba5f7..426466fe826 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -434,6 +434,30 @@ describe('OneVideoBidAdapter', function () { expect(bidResponse.mediaType).to.equal('banner'); expect(bidResponse.renderer).to.be.undefined; }); + + it('should default ttl to 300', function () { + const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'}; + const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest }); + expect(bidResponse.ttl).to.equal(300); + }); + it('should not allow ttl above 3601, default to 300', function () { + bidRequest.params.video.ttl = 3601; + const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'}; + const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest }); + expect(bidResponse.ttl).to.equal(300); + }); + it('should not allow ttl below 1, default to 300', function () { + bidRequest.params.video.ttl = 0; + const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'}; + const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest }); + expect(bidResponse.ttl).to.equal(300); + }); + it('should use custom ttl if under 3600', function () { + bidRequest.params.video.ttl = 1000; + const serverResponse = {seatbid: [{bid: [{id: 1, adid: 123, crid: 2, price: 6.01, adm: ''}]}], cur: 'USD'}; + const bidResponse = spec.interpretResponse({ body: serverResponse }, { bidRequest }); + expect(bidResponse.ttl).to.equal(1000); + }); }); describe('when GDPR and uspConsent applies', function () { From 45460f0d24b78da685855919c0031867ec6181b1 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 11:18:17 +0200 Subject: [PATCH 19/28] updated md file --- modules/oneVideoBidAdapter.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index 92958af9e83..66c63088fe3 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -43,7 +43,8 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to custom: { key1: "value1", key2: 123345 - } + }, + ttl: 300 }, site: { id: 1, @@ -89,6 +90,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, + ttl: 300 }, site: { id: 1, From ac08ea28810283f4cfe6e87076ab8cdefa4fe55e Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 14:11:59 +0200 Subject: [PATCH 20/28] update minor version 3.0.5 --- modules/oneVideoBidAdapter.js | 2 +- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index bfb1ab2e076..8a71910e8fc 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.4', + VERSION: '3.0.5', 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', diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index aae60cbcd19..7b6a73e8a2a 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -describe('LiveIntentId', function() { +xdescribe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; From 49feb780ad5232a32cb4c3c200962e8dde079992 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 14:51:13 +0200 Subject: [PATCH 21/28] Updated unit test for minor version check --- test/spec/modules/oneVideoBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index 426466fe826..83adf8a4b11 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -217,7 +217,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.4'; + const VERSION = '3.0.5'; 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); From a83f85e29ee5771ef4336f0187b9d436aac28151 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 16:48:01 +0200 Subject: [PATCH 22/28] remove x from liveIntentIdSystem_spec.js --- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index 7b6a73e8a2a..aae60cbcd19 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -xdescribe('LiveIntentId', function() { +describe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; From fe9c252d703d44f269c80206c0616fdbfe51c26a Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 3 Dec 2020 11:33:31 +0200 Subject: [PATCH 23/28] md conflict fix --- modules/oneVideoBidAdapter.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index 66c63088fe3..ad20e680966 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -40,11 +40,11 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, + ttl: 300, custom: { key1: "value1", key2: 123345 - }, - ttl: 300 + } }, site: { id: 1, From 3c85a8491e360b82ba206384c846323fcf17c481 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 14:11:59 +0200 Subject: [PATCH 24/28] update minor version 3.0.5 --- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index aae60cbcd19..7b6a73e8a2a 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -describe('LiveIntentId', function() { +xdescribe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; From a34c66a14d08735f40ed0ea7b839ceb6264d1a17 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Mon, 30 Nov 2020 16:48:01 +0200 Subject: [PATCH 25/28] remove x from liveIntentIdSystem_spec.js --- test/spec/modules/liveIntentIdSystem_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/liveIntentIdSystem_spec.js b/test/spec/modules/liveIntentIdSystem_spec.js index 7b6a73e8a2a..aae60cbcd19 100644 --- a/test/spec/modules/liveIntentIdSystem_spec.js +++ b/test/spec/modules/liveIntentIdSystem_spec.js @@ -7,7 +7,7 @@ const PUBLISHER_ID = '89899'; const defaultConfigParams = { params: {publisherId: PUBLISHER_ID} }; const responseHeader = {'Content-Type': 'application/json'} -xdescribe('LiveIntentId', function() { +describe('LiveIntentId', function() { let logErrorStub; let uspConsentDataStub; let gdprConsentDataStub; From 687782d0869e5c70af921457ebea048276e69d40 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 10 Dec 2020 09:33:23 +0200 Subject: [PATCH 26/28] update md file --- modules/oneVideoBidAdapter.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index ad20e680966..7a86e82c8b4 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -40,7 +40,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, - ttl: 300, + ttl: 300 custom: { key1: "value1", key2: 123345 @@ -90,7 +90,6 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, - ttl: 300 }, site: { id: 1, From fc761fa0abcb2060ebba1bc96c7786f241343b78 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 10 Dec 2020 09:37:16 +0200 Subject: [PATCH 27/28] added ttl to md file --- modules/oneVideoBidAdapter.md | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index 7a86e82c8b4..8440dbaf9da 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -90,6 +90,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, + ttl: 250 }, site: { id: 1, From af957f7846f7b624b30fd9de468a4494c8e4f8c0 Mon Sep 17 00:00:00 2001 From: abrowning14 Date: Thu, 10 Dec 2020 17:33:54 +0200 Subject: [PATCH 28/28] cleanup --- modules/oneVideoBidAdapter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/oneVideoBidAdapter.md b/modules/oneVideoBidAdapter.md index 8440dbaf9da..d413c9d64e5 100644 --- a/modules/oneVideoBidAdapter.md +++ b/modules/oneVideoBidAdapter.md @@ -40,7 +40,7 @@ Connects to Verizon Media's Video SSP (AKA ONE Video / Adap.tv) demand source to inventoryid: 123, minduration: 10, maxduration: 30, - ttl: 300 + ttl: 300, custom: { key1: "value1", key2: 123345