Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/adgenerationBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const adgLogger = prefixLog('Adgeneration: ');
*/

const ADG_BIDDER_CODE = 'adgeneration';
const ADGENE_PREBID_VERSION = '1.6.5';
const ADGENE_PREBID_VERSION = '1.6.6';
const DEBUG_URL = 'https://api-test.scaleout.jp/adgen/prebid';
const URL = 'https://d.socdm.com/adgen/prebid';

Expand Down Expand Up @@ -154,6 +154,7 @@ export const spec = {
} else {
// banner
bidResponse.ad = createAd(adResult, body?.location_params, targetImp.ext.params, requestId);
bidResponse.mediaType = BANNER;
}
return [bidResponse];
},
Expand Down
13 changes: 9 additions & 4 deletions test/spec/modules/adgenerationBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { expect } from 'chai';
import { spec } from 'modules/adgenerationBidAdapter.js';
import { newBidder } from 'src/adapters/bidderFactory.js';
import { NATIVE } from 'src/mediaTypes.js';
import { BANNER, NATIVE } from 'src/mediaTypes.js';
import prebid from 'package.json';
import { setConfig as setCurrencyConfig } from '../../../modules/currency.js';
import { addFPDToBidderRequest } from '../../helpers/fpd.js';

describe('AdgenerationAdapter', function () {
const adapter = newBidder(spec);
const ADGENE_PREBID_VERSION = '1.6.5';
const ADGENE_PREBID_VERSION = '1.6.6';
const ENDPOINT_STG = 'https://api-test.scaleout.jp/adgen/prebid';
const ENDPOINT_RELEASE = 'https://d.socdm.com/adgen/prebid';

Expand Down Expand Up @@ -1127,7 +1127,8 @@ describe('AdgenerationAdapter', function () {
netRevenue: true,
ttl: 1000,
ad: '<div></div>',
adomain: ['advertiserdomain.com']
adomain: ['advertiserdomain.com'],
mediaType: BANNER
},
native: {
requestId: '2f6ac468a9c15e',
Expand Down Expand Up @@ -1174,7 +1175,8 @@ describe('AdgenerationAdapter', function () {
netRevenue: true,
ttl: 1000,
ad: `<script type="text/javascript" src="https://i.socdm.com/sdk/js/adg-browser-m.js"></script><script type="text/javascript">window.ADGBrowserM.init({vastXml: '<?xml version="1.0" encoding="UTF-8" standalone="no" ?><VAST version="3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd"></VAST>', marginTop: '50'});</script><img src="http://example.com" width="1" height="1" style="display:none;border:none;padding:0;margin:0;width:1px;height:1px"/>`,
adomain: ['advertiserdomain.com']
adomain: ['advertiserdomain.com'],
mediaType: BANNER
},
}
};
Expand Down Expand Up @@ -1205,6 +1207,7 @@ describe('AdgenerationAdapter', function () {
expect(result.netRevenue).to.equal(bidResponses.normal.upperBillboard.netRevenue);
expect(result.ttl).to.equal(bidResponses.normal.upperBillboard.ttl);
expect(result.ad).to.equal(bidResponses.normal.upperBillboard.ad);
expect(result.mediaType).to.equal(BANNER);
setCurrencyConfig({});
});
});
Expand All @@ -1220,6 +1223,7 @@ describe('AdgenerationAdapter', function () {
expect(result.netRevenue).to.equal(bidResponses.normal.banner.netRevenue);
expect(result.ttl).to.equal(bidResponses.normal.banner.ttl);
expect(result.ad).to.equal(bidResponses.normal.banner.ad);
expect(result.mediaType).to.equal(BANNER);
// no adomian
expect(result).to.not.have.any.keys('meta');
expect(result).to.not.have.any.keys('advertiserDomains');
Expand Down Expand Up @@ -1266,6 +1270,7 @@ describe('AdgenerationAdapter', function () {
expect(result.netRevenue).to.equal(bidResponses.normal.banner.netRevenue);
expect(result.ttl).to.equal(bidResponses.normal.banner.ttl);
expect(result.ad).to.equal(bidResponses.normal.banner.ad);
expect(result.mediaType).to.equal(BANNER);
// no adomain
expect(result).to.not.have.any.keys('meta');
expect(result).to.not.have.any.keys('advertiserDomains');
Expand Down
Loading