Skip to content

Commit b4c2552

Browse files
cs83DmitriChrisHuiepatmmccann
authored
Smartico Bid Adapter: Add meta fields to interpreted response object (#7203)
* Adding smartico adapter * bug #6486 fix, added maintainer email * bug #6486 fix, modified test parameters * bug #6486 fix, modified test parameters #2 * #6486 applied review related updates & fixes * #6486 applied review related updates & fixes #2 * #6486 applied review related updates & fixes #3 * samrtico adapter bug fix * smartico adapter unit test update after bug fixing * smartico adapter bug fix #2 * smartico adapter bug fix #3 * fix linting errors * update for version 5.0: meta.advertiserDomains is added * update for version 5.0: meta.advertiserDomains is added (unit test) update * Update smarticoBidAdapter_spec.js Co-authored-by: Dmitri <[email protected]> Co-authored-by: Chris Huie <[email protected]> Co-authored-by: Patrick McCann <[email protected]>
1 parent df23aec commit b4c2552

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

modules/smarticoBidAdapter.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ export const spec = {
106106
netRevenue: !!ad.netRevenue,
107107
currency: ad.currency,
108108
ttl: ad.ttl,
109-
ad: html
109+
ad: html,
110+
meta: {
111+
advertiserDomains: ad.domains,
112+
advertiserName: ad.title
113+
}
110114
}
111115
bidResponses.push(bidObject);
112116
}

test/spec/modules/smarticoBidAdapter_spec.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ describe('smarticoBidAdapter', function () {
8181
ttl: 30,
8282
bannerFormatWidth: 300,
8383
bannerFormatHeight: 250,
84-
bannerFormatAlias: 'medium_rectangle'
84+
bannerFormatAlias: 'medium_rectangle',
85+
domains: ['www.advertiser.com'],
86+
title: 'Advertiser'
8587
}]
8688
};
8789
let expectedResponse = [{
@@ -93,7 +95,11 @@ describe('smarticoBidAdapter', function () {
9395
currency: 'EUR',
9496
netRevenue: false, // gross
9597
ttl: 30,
96-
ad: '<script id="smartico-widget-testPlacementId-0" async defer type="text/javascript" src="https://trmads.eu/get?token=FNVzUGZn9ebpIOoheh3kEJ2GQ6H6IyMH39sHXaya&auction-id=5kaj89l8-3456-2s56-c455-4g6h78jsdfgf&from-auction-buffer=1&own_session=1&ad=987654&scriptid=smartico-widget-testPlacementId-0&banner-format=medium_rectangle"><\/script>'}];
98+
ad: '<script id="smartico-widget-testPlacementId-0" async defer type="text/javascript" src="https://trmads.eu/get?token=FNVzUGZn9ebpIOoheh3kEJ2GQ6H6IyMH39sHXaya&auction-id=5kaj89l8-3456-2s56-c455-4g6h78jsdfgf&from-auction-buffer=1&own_session=1&ad=987654&scriptid=smartico-widget-testPlacementId-0&banner-format=medium_rectangle"><\/script>',
99+
meta: {
100+
advertiserDomains: ['www.advertiser.com'],
101+
advertiserName: 'Advertiser'
102+
}}];
97103
let result = spec.interpretResponse(serverResponse, bidRequest);
98104
it('should contain correct creativeId', function () {
99105
expect(result[0].creativeId).to.equal(expectedResponse[0].creativeId)
@@ -122,5 +128,8 @@ describe('smarticoBidAdapter', function () {
122128
it('should contain correct ad content', function () {
123129
expect(result[0].ad).to.equal(expectedResponse[0].ad)
124130
});
131+
it('should contain correct meta content', function () {
132+
expect(result[0].meta).to.deep.equal(expectedResponse[0].meta)
133+
});
125134
});
126135
});

0 commit comments

Comments
 (0)