From 4bf11bd17cbeb7a4f6a276311cded55f6c1ec666 Mon Sep 17 00:00:00 2001 From: nalexand <35492736+nalexand@users.noreply.github.com> Date: Wed, 19 Jun 2024 19:55:19 +0200 Subject: [PATCH] SmartytechBidAdapter: Add meta (#11815) * Add mediaimpact bid adapter * Add mediaimpact bid adapter tests * Add custom sizes * Refactor response meta * mediaimpact adapter fix tests * SmartytechBidAdapter: Add meta * MediaimpactBidAdapter: Fix tests * MediaimpactBidAdapter: Fix tests * Add meta to tests * rerun tests * rerun tests --------- Co-authored-by: koshe --- modules/smartytechBidAdapter.js | 9 +++++++-- test/spec/modules/smartytechBidAdapter_spec.js | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/smartytechBidAdapter.js b/modules/smartytechBidAdapter.js index af1442bd301..c081b49c2e6 100644 --- a/modules/smartytechBidAdapter.js +++ b/modules/smartytechBidAdapter.js @@ -127,14 +127,19 @@ export const spec = { creativeId: response.creativeId, netRevenue: true, currency: response.currency, - mediaType: BANNER - } + mediaType: BANNER, + meta: {} + }; if (response.mediaType === VIDEO) { bidObject.vastXml = response.ad; bidObject.mediaType = VIDEO; } + if (response.meta) { + bidObject.meta = response.meta; + } + return bidObject; }, diff --git a/test/spec/modules/smartytechBidAdapter_spec.js b/test/spec/modules/smartytechBidAdapter_spec.js index 6b3147859bf..3b6d5d0c5fc 100644 --- a/test/spec/modules/smartytechBidAdapter_spec.js +++ b/test/spec/modules/smartytechBidAdapter_spec.js @@ -204,7 +204,11 @@ function mockResponseData(requestData) { creativeId: `creative-id-${index}`, cpm: Math.floor(Math.random() * 100), currency: `UAH-${rndIndex}`, - mediaType: mediaType + mediaType: mediaType, + meta: { + primaryCatId: 'IAB2-2', + secondaryCatIds: ['IAB2-14', 'IAB2-6'] + } }; }); return {