From 41e50390f64d841c41358e27d2a7b7d27548c2f2 Mon Sep 17 00:00:00 2001 From: Torsten Dunkel Date: Thu, 5 Jan 2023 10:23:49 +0100 Subject: [PATCH 1/3] Appnexus adapter: add video data from the request to the bid response --- modules/appnexusBidAdapter.js | 1 + test/spec/modules/appnexusBidAdapter_spec.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/appnexusBidAdapter.js b/modules/appnexusBidAdapter.js index 919831b8515..7465ab15780 100644 --- a/modules/appnexusBidAdapter.js +++ b/modules/appnexusBidAdapter.js @@ -731,6 +731,7 @@ function newBid(serverBid, rtbBid, bidderRequest) { displayUrl: nativeAd.displayurl, clickTrackers: nativeAd.link.click_trackers, impressionTrackers: nativeAd.impression_trackers, + video: nativeAd.video, javascriptTrackers: jsTrackers }; if (nativeAd.main_img) { diff --git a/test/spec/modules/appnexusBidAdapter_spec.js b/test/spec/modules/appnexusBidAdapter_spec.js index 1ab8feceaeb..bae2417c278 100644 --- a/test/spec/modules/appnexusBidAdapter_spec.js +++ b/test/spec/modules/appnexusBidAdapter_spec.js @@ -1630,7 +1630,10 @@ describe('AppNexusAdapter', function () { 'phone': '1234567890', 'address': '28 W 23rd St, New York, NY 10010', 'privacy_link': 'https://appnexus.com/?url=privacy_url', - 'javascriptTrackers': '' + 'javascriptTrackers': '', + 'video': { + 'content': '' + } }; let bidderRequest = { bids: [{ @@ -1644,6 +1647,7 @@ describe('AppNexusAdapter', function () { expect(result[0].native.body).to.equal('Cool description great stuff'); expect(result[0].native.cta).to.equal('Do it'); expect(result[0].native.image.url).to.equal('https://cdn.adnxs.com/img.png'); + expect(result[0].native.video.content).to.equal(''); }); } From b500b162e9822f12fe4f1041d0ddca77af1ebd24 Mon Sep 17 00:00:00 2001 From: Chris Huie Date: Thu, 5 Jan 2023 03:58:48 -0700 Subject: [PATCH 2/3] kick off tests --- test/spec/modules/appnexusBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/appnexusBidAdapter_spec.js b/test/spec/modules/appnexusBidAdapter_spec.js index bae2417c278..2cdfc0aa5f4 100644 --- a/test/spec/modules/appnexusBidAdapter_spec.js +++ b/test/spec/modules/appnexusBidAdapter_spec.js @@ -446,7 +446,7 @@ describe('AppNexusAdapter', function () { const payload1 = JSON.parse(request[0].data); const payload2 = JSON.parse(request[1].data); - // 300 / 15 = 20 total + // 300 / 15 = 20 total expect(payload1.tags.length).to.equal(15); expect(payload2.tags.length).to.equal(5); From 6e66ced42de3a97909b15a18c39efac070efc96a Mon Sep 17 00:00:00 2001 From: Chris Huie Date: Thu, 5 Jan 2023 03:59:41 -0700 Subject: [PATCH 3/3] remove change --- test/spec/modules/appnexusBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/appnexusBidAdapter_spec.js b/test/spec/modules/appnexusBidAdapter_spec.js index 2cdfc0aa5f4..bae2417c278 100644 --- a/test/spec/modules/appnexusBidAdapter_spec.js +++ b/test/spec/modules/appnexusBidAdapter_spec.js @@ -446,7 +446,7 @@ describe('AppNexusAdapter', function () { const payload1 = JSON.parse(request[0].data); const payload2 = JSON.parse(request[1].data); - // 300 / 15 = 20 total + // 300 / 15 = 20 total expect(payload1.tags.length).to.equal(15); expect(payload2.tags.length).to.equal(5);